Function in ECMAScript 262
The object representing functions and methods.
Inherits from:
Instance Properties
| name | type | description |
|---|---|---|
| prototype | Object | The prototype for a class. [from Object] |
| constructor | Object | A reference to the constructor class for the current object instance. [from Object] |
| length | Number | (read only) The number of arguments declared with the function. |
| arguments | Array | An array of all parameters passed to the function/method. |
Instance Methods
| name | returns | description |
|---|---|---|
| toLocaleString() | String |
For most objects, the same as toString() unless explicitly overridden.
[from Object]
|
| valueOf() | String |
Returns the internal this value of the object.
[from Object]
|
| hasOwnProperty() | Boolean | Determines if the object/instance itself has the named property or method. [from Object] |
| isPrototypeOf() | Boolean | Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object] |
| propertyIsEnumerable() | Boolean |
Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration.
[from Object]
|
| call() | Object |
Call the function/method, optionally setting a new scope for this and passing in parameters.
|
| toString() | String | Returns a string representation of the object. [from Object] |
| apply() | Object |
Call the function/method, optionally setting a new scope for this and passing in parameters via an array.
|