N-R > Number.toString
Number.toStringSyntax
myNumber
.toString(
radix
);
Arguments
radix
Specifies the numeric base (from 2 to 36) to use for the number-to-string conversion. If you do not specify the radix
argument, the default value is 10.
Description
Method; returns the string representation of the specified Number object (myNumber
).
Player
Flash 5 or later.
Example
The following example uses the Number
.toString
method, specifying 2 for the radix
argument:
myNumber = new Number (
1000
);
(
1000
).toString(2);
Returns a string containing the binary representation of the number 1000.