This article describes the definition and usage of the toString() method. Share it for your reference. The specific analysis is as follows:
This method converts the Number object into a string and returns this string.
The syntax structure is as follows:
Copy the codeThe code is as follows:
(radix)
Parameter list:
parameter | describe |
radix | Optional. Specify the cardinality of the number, making an integer between 2 and 36. If this parameter is omitted, the cardinality 10 is used. But be aware that if the parameter is a value other than 10, the ECMAScript standard allows implementations to return arbitrary values. |
The example code is as follows:
Copy the codeThe code is as follows:
var a=new Number(3);
(());
(());
Output result: 3.
I hope this article will be helpful to everyone's JavaScript programming.