let args = () => {
console.log(arguments.length);
};
args(2,4,5,6,72);
The above returns an error which says, "arguments is not defined."
However, ES5 syntax works are expected (see below):
var args = function() {
console.log(arguments.length);
};
args(2,4,5,6,72);
I would really appreciate an explanation and a remedy to this problem I have run into when using the ES6 syntax. Thanks.