Examveda
Examveda

Consider the following code snippet
var a1 = [,,,]; 
var a2 = new Array(3); 
0 in a1 
0 in a2
The result would be

A. true false

B. false true

C. true true

D. false true

Answer: Option A

Solution(By Examveda Team)

a1 has an element with index 0 and a2 has no element with index 0.

Join The Discussion

Related Questions on Array and Function