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

πŸ‘οΈ
80
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
97%
Success Rate