Script: Class Top Level Function
Class Function
- Object
- Function
The Function class represent a JavaScript function.
Properties
length : Number
The number of named arguments that were specified when the function was declared.
prototype : Object
An object that defines properties and methods shared by all objects created with that constructor function.
Constructor Summary
Constructs the function with the specified arguments where the last argument represents the function body and all preceeding arguments represent the function parameters.
Method Summary
apply(thisobj : Object, args : Array) : Object
Invokes this function as a method of the specified object passing the specified Array of arguments.
call(thisobj : Object, args : Object...) : Object
Invokes this function as a method of the specified object passing the specified optional arguments.
Returns a String representation of this function object.
Methods inherited from class Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Constructor Detail
Function
publicFunction(args : String...)
Constructs the function with the specified arguments where the last argument represents the function body and all preceeding arguments represent the function parameters.
Parameters:
args - one or more Strings where the last argument in the list represents the function body and all preceeding arguments represent the function parameters.
Method Detail
apply
apply(thisobj : Object, args : Array) : Object
Invokes this function as a method of the specified object passing the specified Array of arguments.
Parameters:
thisobj - the object to which the function is applied.
args - Array of values or an arguments object to be passed as arguments to the function.
Returns:
whatever value is returned by the invocation of the function.
call
call(thisobj : Object, args : Object...) : Object
Invokes this function as a method of the specified object passing the specified optional arguments.
Parameters:
thisobj - the object to which the function is applied.
args - an optional list of one or more arguments values that are passed as arguments to the function.
Returns:
whatever value is returned by the invocation of the function.
toString
toString() : String
Returns a String representation of this function object.
Returns:
a String representation of this function object.