➢JavaScript has only one type of number. Numbers can be written with or without decimals.
➢Integers (numbers without a period or exponent notation) are accurate up to 15 digits.
➢The maximum number of decimals is 17.
EXAMPLE:
let x = 99999999999999999; // x will be 999999999999999
let x = 999999999999999999; // y will be 10000000000000000
➢NaN is a JavaScript reserved word indicating that a number is not a legal number.
EXAMPLE:
let x = 100 / "Apple";
isNaN(x);
➢Infinity (or -Infinity) is the value JavaScript will return if you calculate a number outside the largest possible number.
EXAMPLE:
let x = 100;
// Execute until Infinity;
while (x != Infinity) {
x = x * x;
}
➢JavaScript interprets numeric constants as hexadecimal if they are preceded by 0x.