How to Use the Number Object

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.

Instance properties

These properties are defined on Number.prototype and shared by all Number instances.

Number.prototype.constructor

The constructor function that created the instance object. For Number instances, the initial value is the Number constructor.