Skip to content

The arguments Object

Inside non‑arrow functions, the arguments object is an array‑like object containing the passed arguments. It is not available in arrow functions.

function showArgs() {
console.log(arguments[0]);
console.log(arguments.length);
}
showArgs("hello", 42); // hello, 2