ES6 – Number Primitive Datatype
Computers were used to be much smaller in early days, so groups of 8 or 16 bits were used to represent numbers. So memory would be easily be overflown by numbers. But today even small computer that fits in your pocket have plenty of memory to store any large number with less likely to overflow the memory.
Bits also can store any negative number by designating one bit for the sign (+, -) for that number that uses it.
let num = 7
let num = 8.9
e for exponent followed by exponent of the number.
let num = 5.76e8 that is
576 x 108 = 299800000
-Infinity numbers that represent the positive and negative infinity numbers in mathematics, These cannot be trusted in computation which leads to
NaN special number.
0/0 (zero divided by zero), to Infinity and this would not be a meaningful number.
// Literal syntax
let num1 = 980
let num2 = 980.00
num1 === num2 // true
// Function syntax
let num3 = Number(980) // 980
Number(“number”) // NaN