A

Admin • 833.24K Points
Coach

Q. Which one will return 'true'?

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

Explanation by: Admin

[] is truthy, so ![] is false. [] == false evaluates to true due to coercion.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.