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

What is the output?

console.log([1, 2] == '1,2');
  1. true
  2. false
  3. TypeError
  4. undefined
Loose equality turns the array into the string '1,2' before comparing.
Play Problem Solving ▸