According to my understanding to the specification ECMA Section 8.5 - The Number Type, there are 3 kinds of representations to the Javascript Number, namely:
- NaN
- infinity
- finite numbers
Let's read again a few excerpts from the specification:
the 9007199254740990 (that is, 253−2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special NaN value. [...] all NaN values are indistinguishable from each other.
Note that NaN is actually 1 single special value although multiple values are used to represent NaNs.
There are two other special values, called positive Infinity and negative Infinity.
This is simple and obvious that we have 2 infinity values.
The other 18437736874454810624 (that is, 264−253) values are called the finite numbers.
And there are 18437736874454810624 finite numbers.
So, adding up all the numbers: 1 + 2 + 18437736874454810624 = 18437736874454810627