Arguments Object
suggest changeArrow 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents