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

What is the output?

console.log(0.1 + 0.2 + 0.3 === 0.3 + 0.2 + 0.1);
  1. false
  2. true
  3. NaN
  4. TypeError
Float addition is not associative, so the two orders round differently.
Play Problem Solving ▸