arguments become what in javascript code example
Example 1: how to access any argument in javascript
function example() {
console.log(arguments);
console.log(arguments[0]);
} // Console outputs an array of each argument with its value
example('hi', 'hello');
// Outputs:
// ['hi', 'hello']
// 'hi'
Example 2: parameters in javascript
function myFunction(x, y) {
if (y === undefined) {
y = 2;
}
}