toString Method (Number)
Language Reference |
See Also Applies To
Converts a Number object or numeric variable into a string using the specified radix.
number.toString([ radix ]);
The toString method syntax has these parts:
Part Description number A Number object or variable. Cannot be a numeric literal. radix An optional argument specifying the base to use when converting the number. Values between 2 and 16 inclusive are accepted. If not supplied, base 10 is used.
Due to syntax restrictions, the toString method cannot be used on numeric literals. Values must be assigned to variables first. For example, the following code is invalid:This code must be rewritten:
str = 1997.toString( );
var yr = 1997; str = yr.toString( );
© 1997 by Microsoft Corporation. All rights reserved.
|file: /Techref/inet/iis/jscript/htm/js525.htm, 2KB, , updated: 1997/9/30 03:44, local time: 2022/1/22 12:46,
|©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.massmind.org/techref/inet/iis/jscript/htm/js525.htm"> toString Method (Number)</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to www.massmind.org!