arguments

JavaScript 1.1+, ECMAScript 1.0+ Nav3+ Syntax

arguments
arguments[index]

Description

The Arguments object is an array that contains all the arguments passed into the currently executing function as well as a few other useful properties. This object is automatically created and initialized when a function is invoked and goes out of scope as soon as the code function finishes executing. To access arguments passed into a function, simply use array brackets to specify an index. Table 6.6 lists the properties associated with Argument object.

Note

To use the Argument object, you do not specify the function using dot notation as you might expect. This is because this object is different from the Function.arguments[] array associated ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.