$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #190

What is the output?

console.log([] == ![]);
  1. true
  2. false
  3. TypeError
  4. undefined
![] is false, both sides coerce to numbers, and an empty array becomes 0 — so 0 == 0.
Play Problem Solving ▸