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
πŸ’¬ Discuss
βœ… Correct Answer: (A) true false
Explanation: a1 has an element with index 0 and a2 has no element with index 0.
Explanation by: Mr. Dubey
a1 has an element with index 0 and a2 has no element with index 0.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
136
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate