Availability
JavaScript 1.1; JScript 2.0, ECMAScript v1
Inherits from/Overrides
Overrides Object.toString( )
Synopsis
number.toString(radix)Arguments
radix
An optional argument that specifies the radix, or base, between 2 and
36, in which the number should be represented. If omitted, base 10 is
used. Note, however, that the ECMAScript specification allows an
implementation to return any value if this argument is specified as
any value other than 10.
Returns
A string representation of the number.
Throws
TypeError
If this method is invoked on an object that is not a Number.
Description
The toString( ) method of the Number object
converts a number to a string. When the
radix argument is omitted or is specified
as 10, the number is converted to a base-10 string. If
radix is any other value, this method
returns an implementation-defined string. Netscape implementations
and Microsoft implementations after JScript 3.0 honor the
radix argument and return a string
representation of the number in the specified base.
See Also
Number.toExponential( ), Number.toFixed( ), Number.toLocaleString( ),
Number.toPrecision( )
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.