Javascript Reference
Categories: arguments

javascript arguments Description

@July 28, 2009, 8:36 a.m.
arguments Firefox/Netscape/NN 3 IE 4 ECMA 1  

 

  

Every functionwhile it is executinghas an arguments object, which is accessible as a property of the function. The object is created automatically, and cannot be created outside of the function context that owns it. For example, consider a typical function definition:

function myFunc( ) {
     // function statements
}
 

A statement inside the function can access the arguments object by the following reference:

arguments
 

This object always contains the callee property, which is a reference to the very same function (explained in the callee property discussion). But you can also use the arguments object to access each parameter variable value through array notation. In the above example, a statement inside the myFunc( ) function can access the passed parameter value with the following reference:

arguments[0]
 

See the arguments property discussion of the Function object for practical applications.

 
Properties
 
callee length
 
Methods

None.


Powered by Linode.