Hey,
I’m watching Crockford’s series on Javascript.
In act III in this moment:https://youtu.be/ya4UHuXNygM?list=PL7664379246A246CB&t=804
he says “If too arguments are being passed to a function - they’re ignored. But they still go to arguments array”.
I know about arguments array-like object. But i don’t get how are the extra arguments really “ignored” if they’re passed to the function in arguments object? I mean, i have access to those extra ones, so where is the “ignoring”?
For example having a function:
function add (x, y, z) {
var sum = 0;
for (var i =0; i < arguments.length; i++) {
sum += arguments[i];
}
}
add(1,2,3,8,9);
I’m still adding all 5 numbers, right?