console.log([] == ![]);0
What will this output and why?
subina kallyani
easy
2completed
375
Answer
It prints true![] → false because non-empty arrays are truthy.[] == false → JavaScript coerces both sides:
[] becomes "", which coerces to 0
false coerces to 0
So 0 == 0 → true.
Click to Reveal Answer
Tap anywhere to see the solution
Revealed
Comments0