Introduction
The arguments object in function definition contains an JSON-like object which keys are names of parameters and values are the value of arguments when function call.
For more details, see the following example.
Example
Example 1
Code
function func1(a, b, c) {
console.log(arguments);
console.log(arguments[0]);
console.log(arguments[1]);
console.log(arguments[2]);
}
func1(1, 2, 3);
Output
In MDN online tool.
> Object { 0: 1, 1: 2, 2: 3 }
> 1
> 2
> 3