What is the output?
console.log(Number.isInteger(5.0), Number.isInteger('5'));
- true false
- false false
- true true
- false true
5.0 is the same number as 5, but a string is never coerced by Number.isInteger.
Play Problem Solving ▸
console.log(Number.isInteger(5.0), Number.isInteger('5'));