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

What is logged?

console.log([] == false, [] == 0, [0] == false);
  1. true true true
  2. false false false
  3. true false true
  4. false true false
Each side converts to a number, and both [] and [0] become 0.
Play Problem Solving ▸