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

What is the output?

console.log(Number.isInteger(5.0), Number.isInteger('5'));
  1. true false
  2. false false
  3. true true
  4. false true
5.0 is the same number as 5, but a string is never coerced by Number.isInteger.
Play Problem Solving ▸