The toString () method can convert a Number object to a string and return this string. This article describes the toString () method of the JavaScript Number object, if you are interested in javascript Object methods, let's take a look at the definition and usage of toString:
The toString () method can convert a Number object into a string and return this string.
Click to view the methods and attributes of more related Number objects (classes.
Syntax structure:
The Code is as follows:
NumberObject. toString (radix)
Parameter List:
Parameters |
Description |
Radix |
Optional. Indicates the base number of a number, so that 2 ~ An integer between 36. If this parameter is omitted, base 10 is used. Note that if this parameter is a value other than 10, the ECMAScript standard allows any value to be returned. |
Instance code:
var a=new Number(3);console.log(a.toString());
Output result: 3.