This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

constants

Summary

The following number constants are properties of the Number object.

Syntax

Number Object Constants

You do not have to create Number object to access these constants.

ConstantValue returned
Number.MAX_VALUEThe largest number that can be represented in JavaScript. Equal to approximately 1.79E+308.
Number.MIN_VALUEThe closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324.
Number.NaNA 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_INFINITYA value that is less than the largest negative number that can be represented in JavaScript.JavaScript displays NEGATIVE_INFINITY values as -infinity.
Number.POSITIVE_INFINITYA value greater than the largest number that can be represented in JavaScript.JavaScript displays POSITIVE_INFINITY values as infinity.

See also

Other articles

Attributions

  • Microsoft Developer Network: Article