Microsoft® JScript™
toString Method
 Language Reference 
Version 2 

See Also                  Applies To


Description
Returns a string representation of an object.
Syntax
objectname.toString( )

The objectname argument is an object for which a string representation is sought.

Remarks
The toString method is a member of all built-in JScript objects. How it behaves depends on the object type:

Object Behavior
Array Behavior [still to come]
Boolean If the Boolean value is true, returns "true". Otherwise, returns "false"
Function Returns a string returned of the following form, where functionname is the name of the function whose toString method was called:
function functionname( ) { [native code] }
Number Returns the textual representation of the number.
String Returns the value of the String object.
Default Returns "[object objectname]", where objectname is the name of the object type.


© 1998 Microsoft Corporation. All rights reserved. Terms of Use.