JS: Number (class)
What is the Keyword βNumberβ
Number is the value of the property key "Number" of the Global Object
.
console.assert(globalThis["Number"] === Number);
Type
Type of Number is a function.
console.assert(typeof Number === "function");
Parent
Parent of Number is Function.prototype.
console.assert(Reflect.getPrototypeOf(Number) === Function.prototype);
Purpose
Purpose of Number is:
- A Primitive Value object wrapper.
- Used as a namespace to hold static methods.
- Holds the property key
"prototype". Its value is the parent of all number object.
Number Constructor
Properties
- JS: Number.parseInt (String to Number)
- JS: Number.parseFloat (String to Number)
- JS: Number.isFinite
- JS: Number.isInteger
- JS: Number.isNaN
- JS: Number.isSafeInteger
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);
Number.MIN_SAFE_INTEGERNumber.MAX_SAFE_INTEGER
Number.EPSILONNumber.MIN_VALUENumber.MAX_VALUE
JavaScript. Number
- JS: Number
- JS: Number Input. Binary, Hexadecimal, Octal, Etc
- JS: BigInt tutorial
- JS: Assignment Operators
- JS: Arithmetic Operators
- JS: Number Comparison Operators
- JS: Convert String and Number
- JS: Convert Decimal, Hexadecimal
- JS: Convert Decimal, Binary
- JS: Format Number
- JS: Random Integer Range Function π
- JS: Number (class)
- JS: Number Constructor
- JS: Number.prototype
- JS: Math (namespace)