I was reading about arrow function in js. There I found one question.
var arguments = [1, 2, 3];
var arr = () => arguments[2];
console.log(arr());
function foo(n) {
var f = () => arguments[0] + n;
return f();
}
console.log(foo(3));
It's output is showing 6. Can anyone explain why it is so?