JavaScript Number.prototype.toString() example

Posted by Editorial Staff | Updated on

JavaScript Number.prototype.toString() example. The Number object overrides the toString() method of the Object object. (It does not inherit Object.prototype.toString()). For Number objects, the toString() method returns a string representation of the object in the specified radix.

The toString() method parses its first argument, and attempts to return a string representation in the specified radix (base). For radices above 10, the letters of the alphabet indicate numerals greater than 9. For example, for hexadecimal numbers (base 16), a through f are used.


Return value
A string representing the specified Number object.

Javascript toString() Examples:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers