Object.toString() (Method)

Return a string primitive version of an object.

Availability:

ECMAScript edition - 2
JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera browser - 3.0
Property/method value type:String primitive
JavaScript syntax:-myObject.toString()

When the toString() method of an Object.prototype is invoked, the class name of the object is returned as a string.

The result of calling this method will be the string:

[object "Object"]

See also:Cast operator, Object.prototype, toString()

Cross-references:

ECMA 262 edition 2 - section - 15.2.4.2

ECMA 262 edition 3 - section - 15.2.4.2