JavaScript toString Method: Number Object
Description
The toString() method is used to get a string representation of the specified number object.
Version
Implemented in JavaScript 1.1
Syntax
toString() toString(radix)
Parameters
radix: An integer between 2 and 36 specifying the base to use for representing numeric values.
Example:
In the following web document, toString() method returns the string representation of a given number.
View the example in the browser
Supported Browser
Internet Explorer 7 | Firefox 3.6 | Google Chrome 7 | Safari 5.0.1 | Opera 10 |
Yes | Yes | Yes | Yes | Yes |
See also:
JavaScript Core objects, methods, properties.
Previous: JavaScript toSource Method: Number Object
Next:
JavaScript valueOf Method: Number Object
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics