Returns a string representing the specified Number object.
Method of Number
Syntax
toString()
toString([radix])
Parameters
Parameter | Description |
---|---|
radix | An integer between 2 and 36 specifying the base to use for representing numeric values. |
Description
The Number object overrides the toString method of the Object object; it does not inherit Object.toString. For Number objects, the toString method returns a string representation of the object.
MetaScript calls the toString method automatically when a number is to be represented as a text value or when a number is referred to in a string concatenation.
For Number objects and values, the built-in toString method returns the string representing the value of the number.
You can use toString on numeric values, but not on numeric literals: