From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Number Object
The toString() method specifies which base to use for representing a numeric value, and then returns the numeric value as a string.
| NumberObject.toString(radix) |
| Parameter | Description |
|---|---|
| radix | Optional. An integer between 2 and 36 specifying the base
to use for representing numeric values. Examples:
|
ExampleSpecify different bases for a numeric value, and then return the numeric value as a string:
The output of the code above will be: Try it yourself » |
JavaScript Number Object
From http://www.w3schools.com (Copyright Refsnes Data)