A

Admin • 802.91K Points
Coach

Q. 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
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
a1 has an element with index 0 and a2 has no element with index 0.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.