Number
QuickLinks
Class
Methods
Constructor
Number Number (value:
any)
Returns a new Number object set to the value of the argument converted to a number.
Parameter | Type | Description |
---|---|---|
value | any | The value of the object being created. |
Example | new Number(value) |
Instances
number toExponential (decimals:
number)
Converts the Number object to a string in scientific notation.
Parameter | Type | Description |
---|---|---|
decimals | number | The number of decimals. |
number toFixed (decimals:
number)
Converts the Number object to a string with fixed decimals.
Parameter | Type | Description |
---|---|---|
decimals | number | The number of decimals. |
number toLocaleString ()
Returns the value of a Number object converted to a string, using localized conventions.
number toPrecision (decimals:
number)
Converts the Number object to a string in either scientific or fixed notation, epending on its value.
Parameter | Type | Description |
---|---|---|
decimals | number | The number of decimals. |
number toSource ()
Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.
number toString ([radix:
number])
Returns the value of a Number object converted to a string.
Parameter | Type | Description |
---|---|---|
radix | number | The optional conversion radix. (Optional) |
Example | num.toString(16) |
number valueOf ()
Returns the value of a Number object as a primitive number.
Example | num.valueOf() |
Return
Number Number.Number (value: any)
Jongware, 28-Apr-2012 v3.0.3i | Contents :: Index |