πŸ“Š JavaScript
Q. What is the result of this code?
Code:
console.log([] == 0);
  • (A) true
  • (B) false
  • (C) undefined
  • (D) NaN
πŸ’¬ Discuss
βœ… Correct Answer: (A) true

Explanation: JavaScript coerces [] to 0 when compared with ==

Explanation by: Chandani
JavaScript coerces [] to 0 when compared with ==

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
58
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
92%
Success Rate