What does the 'arguments' object contain in a non-arrow function?

The story behind the answer

In a non-arrow function, the arguments object contains all arguments passed to that function call. It is available inside traditional functions even when the function declaration names fewer parameters than the caller supplies.

The object is array-like: it has numbered properties such as arguments[0] and a length property, but it is not a true Array and does not directly provide methods such as map or reduce. Code can convert it with Array.from(arguments), a spread expression, or an array method called with Function.prototype.call.

The object represents the call’s supplied arguments, not the function’s name or return value. In older non-strict functions, changing a named parameter can also be reflected in the corresponding arguments entry, and vice versa; strict mode removes that linkage. Arrow functions do not have their own arguments object and instead resolve arguments from an enclosing non-arrow function, if one exists.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: