Function.toSource

Returns a string representing the source code of the function.

Method of Function

Syntax

toSource()

Parameters

None

Description

The toSource method returns the following values:
For the built-in Function object, toSource returns the following string indicating that the source code is not available:

For custom functions, toSource returns the MetaScript source that defines the object as a string.
This method is usually called internally by MetaScript and not explicitly in code. You can call toSource while debugging to examine the contents of an object.

See also

Function.toString, Object.valueOf

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.