uses the โdouble precisionโ format (aka โ64-bit binaryโ).
๐ You Don't Know JS: Types & Grammar
all are floating-point.
all have floating-point results.
The exponent is an 11-bit from 0 to 2047, in : an exponent value of 1023 represents the actual zero. Exponents range from โ1022 to +1023 because exponents of โ1023 (all 0s) and +1024 (all 1s) are reserved for special numbers.
// โญ๏ธ `NaN` is the ONLY ONE that doesn't equal to itself.
NaN === NaN, // falseโ๏ธ
NaN !== NaN, // trueโ๏ธ
isNaN('foo'), // trueโ๏ธ (โญ๏ธ DON'T use isNaN())
Number.isNaN('foo'), // false (โญ๏ธ use Number.isNaN() instead)
Number.isNaN(NaN), // true
2 / 'foo', // NaN