I just discovered that the arguments
object actually changes if one of the parameters change.
For example:
function some(a, b, c ){
console.log(arguments);
args = [ a, b, c ];
a = new Date();
console.log(arguments);
console.log(args);
}
some(1,2,3 );
You will see that while args
stays the same (expected behaviour), arguments
actually change.
Questions:
Is this something that is well documented? If so, where?
Is there anything else I need to be careful about the
arguments
object?
This is specified in the ECMA standard sec-10.6: