This article describes Number
, a primitive wrapper object used to represent and manipulate numbers. "Number" represents floating point numbers like 45 or -3.24. Numbers are encoded as 64-bit binary, much like double in Java. There are some helpful functions in "Number" like Number ("123") would return the actual number 123. However, a "Number" ("Iamnotanumber") would return NaN (Not-a-Number) because it could not convert that into a number.
Static properties
Number.EPSILON
-
The smallest interval between two representable numbers.
Number.MAX_SAFE_INTEGER
-
The maximum safe integer in JavaScript (253 - 1).
Number.MAX_VALUE
-
The largest positive representable number.
Number.MIN_SAFE_INTEGER
-
The minimum safe integer in JavaScript (-(253 - 1)).
Number.MIN_VALUE
-
The smallest positive representable number-that is, the positive number closest to zero (without actually being zero).
Number.NaN
-
Special "Not a Number" value.
Number.NEGATIVE_INFINITY
-
Special value representing negative infinity. Returned on overflow.
Number.POSITIVE_INFINITY
-
Special value representing infinity. Returned on overflow.