On this page
  1. Global.Number_isNaN
  2. Signature & Overview
  3. Notes & Pitfalls
  4. Example

Global.Number_isNaN

Prev: structuredClone | Up: Global | Next: parseInt
Rel: Global, JS Core Syntax & Types
Ref: MDN Web Docs — Global.Number_isNaN
Tags: #public #web #javascript #builtins #global #tier/core


Signature & Overview

Number.isNaN(value)

Returns true only if value is literally the NaN number (no type coercion).

Notes & Pitfalls

Example

console.assert(Number.isNaN(NaN) === true);
console.assert(Number.isNaN("hello") === false);
console.assert(Number.isNaN(undefined) === false);

Linked from

Related notes