Number constants

suggest change

The Number constructor has some built in constants that can be useful

Number.MAX_VALUE;          // 1.7976931348623157e+308Number.MAX_SAFE_INTEGER;   // 9007199254740991Number.MIN_VALUE;          // 5e-324Number.MIN_SAFE_INTEGER;   // -9007199254740991Number.EPSILON;            // 0.0000000000000002220446049250313Number.POSITIVE_INFINITY;  // InfinityNumber.NEGATIVE_INFINITY;  // -InfinityNumber.NaN;                // NaN

In many cases the various operators in Javascript will break with values outside the range of (Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)

Note that Number.EPSILON represents the different between one and the smallest Number greater than one, and thus the smallest possible difference between two different Number values. One reason to use this is due to the nature of how numbers are stored by JavaScript see Check the equality of two numbers

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Built-in constants:
* null
* Number constants
* NaN

Table Of Contents
3 Built-in constants
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde