Convert a number to a string:
The result of n will be:
The toString() method converts a Number object to a string.
![]()
The toString() method is supported in all major browsers.
| Parameter | Description |
|---|---|
| radix | Optional. Which base to use for representing a numeric value. Must be an integer between 2 and 36.
|
| Type | Description |
|---|---|
| String | The number as a string |
| JavaScript Version: | 1.1 |
|---|
Convert a number to a string, using different bases:
The result of a,b,c, and d will be:
JavaScript Number Object
Your message has been sent to W3Schools.