JS: Number (class)

By Xah Lee. Date: . Last updated: .

What is the Keyword β€œNumber”

Purpose of Number is:

Number Constructor

Properties


Number.NaN

Value is NaN.

console.assert(Number.isNaN(Number.NaN));
Number.NEGATIVE_INFINITY

Value is -Infinity.

console.assert(Number.NEGATIVE_INFINITY === -Infinity);
Number.POSITIVE_INFINITY

Value is +Infinity.

console.assert(Number.POSITIVE_INFINITY === Infinity);