# The Number isNaN() method

> Learn how the JavaScript Number.isNaN() method works, returning true only for NaN or 0/0 and false for every other value you pass to it.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2019-03-15 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/javascript-number-isnan/

`NaN` is a special case. A number is `NaN` only if it's `NaN` or if it's a division of 0 by 0 expression, which returns `NaN`. In all the other cases, we can pass it what we want but it will return `false`:

```js
Number.isNaN(NaN) //true
Number.isNaN(0 / 0) //true

Number.isNaN(1) //false
Number.isNaN('Flavio') //false
Number.isNaN(true) //false
Number.isNaN({}) //false
Number.isNaN([1, 2, 3]) //false
```
