Arguments Object

suggest change

Arrow functions do not have their own arguments object. A use of arguments inside an arrow resolves to the enclosing non-arrow function's arguments object, if there is one. Binding the name arguments yourself is a syntax error in strict mode and in modules.

function outer() {
    const foo = () => arguments[0];
    return foo("ignored");
}

outer(true); // true

Rest parameters give an arrow function its own array of arguments. Arrow functions also have no arguments.callee.

const foo = (...args) => args[0];

foo(false); // false

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents