The Number object serves primarily as a means for data type conversions. The constructor will attempt to convert any type to a number, and the toString() method will convert the stored numerical value to a string.
Constructor
[new]
Number(value) |
Constructs and returns
a new Number object instance with value converted to its numerical equivalent. The value of the new Number object will be undefined if the argument cannot be converted to a number. |
|
Instance Methods
format |
Returns the
Number object instance in a currency or scientific format. |
valueOf |
Returns the primitive number value of the Number object. |
toString |
Returns a string indicating the value of the Number object instance. |
|
|