Skip to content

Glossary: JavaScript Basics

Number.isNaN / Number.isInteger

Also written: Number.isNaN, Number.isInteger, isNaN

Checks that answer `true` or `false`: `Number.isNaN(x)` tests for `NaN`, and `Number.isInteger(x)` is true only for whole numbers. They are used to validate input.

Where the book teaches it

Related terms

NaNNumber (conversion)