A

Admin • 828.03K Points
Coach

Q. What is the result of this code?

Code:
console.log([] == 0);
  • (A) true
  • (B) false
  • (C) undefined
  • (D) NaN
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category JavaScript
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.