JavaScript Number toString()
JavaScript Number toString()
The toString() method is used to return a number as a string. Each object in JavaScript has a toString() method. It is used when we need to display a number as a string.
Syntax:-
Its syntax is:- number.toString(radix)
Return:-
Its return is:- number as a string
Further Explanation:-
Parameter | Description |
radix | Optional. The base to use. It is between 2 and 36. Base 2 is Binary and Base 16 is Hexadecimal. |