Number.isNaN() Is it NaN
Last updated: 2026-09-09
Number.isNaN() Is it NaN
Number.isNaN checks whether a value is NaN. NaN is the only value not equal to itself.
| Category | Global Functions |
|---|---|
| ES version | ES2015 |
📝 Syntax
Number.isNaN(value);
⚙️ Parameters
| value | The value to check. |
|---|
Returns:A boolean.
Mutates the original:No (returns a new value)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
true
false
false
true
💡 Tip NaN === NaN is false — must use Number.isNaN().
⚠️ Warning Global isNaN() coerces — Number.isNaN() is more precise.
🌐 Browser support
| Browser | |||||
|---|---|---|---|---|---|
| Number.isNaN() | ✓ v32 | ✓ v12 | ✓ v27 | ✓ v8 | ✓ v19 |
| Supported by all modern browsers | |||||
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QWhy is NaN !== NaN?
AIEEE 754 defines NaN as undefined — two undefined values should not be equal.
QisNaN vs Number.isNaN?
AisNaN coerces first; Number.isNaN does not — more precise.
QWhat produces NaN?
AMath with non-numbers, failed parsing, 0/0.