Standard built-ins
Number.isNaN()
Checks whether the supplied value is a Number whose value is NaN. Unlike the global isNaN function, this operation does not first coerce its input. Useful after explicit Number conversion to identify invalid numeric text.
Formal Syntax & Structure
javascript syntaxjavascript
Number.isNaN(value)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | any | Value to check without conversion. |
Return Value
boolean
True only for actual Number NaN.
Working Example
Example Snippetjavascript
console.log(Number.isNaN(NaN));console.log(Number.isNaN("oops"));