The following number constants are properties of the Number object.
Number Object Constants
You do not have to create Number object to access these constants.
| Constant | Value returned |
|---|---|
Number.EPSILON |
The smallest number that can be represented in JavaScript. Equal to approximately 2.2204460492503130808472633361816E-16. |
Number.MAX_SAFE_INTEGER |
The largest number that can be safely represented in JavaScript. Equal to 9007199254740991. |
Number.MAX_VALUE |
The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. |
Number.MIN_SAFE_INTEGER |
The smallest number that can be safely represented in JavaScript. Equal to -9007199254740991. |
Number.MIN_VALUE |
The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. |
Number.NaN |
A value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. |
Number.NEGATIVE_INFINITY |
A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE_INFINITY values as -infinity. |
Number.POSITIVE_INFINITY |
A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE_INFINITY values as infinity. |
Requirements
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported Store apps (Windows 8 and Windows Phone 8.1). See Version Information.
For Number.EPSILON, Number.MAX_SAFE_INTEGER, and Number.MIN_SAFE_INTEGER:
Supported in Microsoft Edge (Edge browser). Also supported in Store apps (Microsoft Edge on Windows 10). See Version Information.
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.1.
Applies To: Number Object
See Also
Math Constants
JavaScript Constants
Infinity Constant
NaN Constant
isNaN Function


