Function
QuickLinks
Properties
Property | Type | Access | Description |
---|---|---|---|
arguments | Object | r/w | The function arguments, packed into an array. This property is deprecated; use the arguments property within the function body. |
arity | number | readonly | The number of formal arguments. This property is deprecated; use the length property instead. |
length | number | readonly | The number of formal arguments. |
name | string | readonly | The function name. |
Methods
Constructor
Function Function (arguments: string, body: string) The Function constructor parses the argument list and creates a Function object.
Parameter | Type | Description |
---|---|---|
arguments | string | The list of formal arguments, separated by commas. The formal arguments can also be supplied one by one; in this case, the last argument to the Function constructor is considered to be the function body. |
body | string | The body of the function to create. |
Instances
any apply (thisObj:
Object, args:
Array)
Apply a this object and an argument list to a function.
This function is different from call(); here, the arguments are suppliedas an Array object.
Parameter | Type | Description |
---|---|---|
thisObj | Object | The object to be used as this. |
args | Array | An array of arguments. |
any call (thisObj:
Object, argument:
any)
Apply a this object and arguments to a function.
This function is different from apply(); here, the arguments are supplied one by one.
Parameter | Type | Description |
---|---|---|
thisObj | Object | The object to be used as this. |
argument | any | The first agument to the function. Add as many as needed. |
string toSource ()
Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with JavaScript functions.
string toString ()
Returns the function definition as a string.
Element of
EventListener.handler
Object.constructor
Used in:
void Array.sort (userFunction: Function)
void Object.watch (name: string, func: Function)
Return
Function Function.Function (arguments: string, body: string)
Jongware, 28-Apr-2012 v3.0.3i | Contents :: Index |