Lets you work with numeric values. The Number object is an object wrapper for primitive numeric values and a core object.
new Number(value);
value
The numeric value of the object being created.
The primary uses for the Number object are:
The properties of Number are properties of the class itself, not of individual Number objects.
Number(x) now produces NaN rather than an error if x is a string that does not contain a well-formed numeric literal. For example:
The following example uses the Number object's properties to assign values to several numeric variables:
biggestNum = Number.MAX_VALUE smallestNum = Number.MIN_VALUE infiniteNum = Number.POSITIVE_INFINITY negInfiniteNum = Number.NEGATIVE_INFINITY notANum = Number.NaN
The following example creates a Number object, myNum, then adds a description property to all Number objects. Then a value is assigned to the myNum object's description property.