O Object.toString() (Method) This (Web proxy server) is an alternative

O Object.toString() (Method) This is an alternative way to deliver a string version of an object’s internal values. In this case, it is formatted as an Object literal and can then be used in an eval() function to assign another object. The exact format of what you see depends on the object being examined. The result of calling this method is string version of the object formatted as an Object literal. Warnings: . Note that this is not available in the MSIE browser but can be useful when constructing an Object inspector for use in Netscape. 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 1587

Leave a Reply