Function.toString() (Method)

Returns a string primitive version of an object.

Availability:

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

The result of calling this method is to obtain the source text of the function definition unless it is a host implemented function. In that case, an implementation dependant value will be returned by this method.

See also:Cast operator, Function call, Function.prototype, Function.valueOf(), toString()

Cross-references:

ECMA 262 edition 2 - section - 15.3.4.2

ECMA 262 edition 3 - section - 15.3.4.2