$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #28

What is the output?

console.log(0.1 + 0.2 === 0.3);
  1. true
  2. false
  3. NaN
  4. 0.3
Float rounding makes 0.1 + 0.2 not exactly equal to 0.3.
Play Problem Solving ▸