I'm wondering why the following arrow function, named 'countArg2' doesn't work. Is there anybody can explain what's wrong please?
This works
function countArg1() {
return arguments.length;
}
countArg1(1, 2, 3); //3
This doesn't work..
const countArg2 = () => arguments.length;
countArg2(1, 2, 3);
// VM6745:1 Uncaught ReferenceError: arguments is not defined
Thank you in advance.