Overwriting arguments object for a Javascript function
- by Ian Storm Taylor
If I have the following:
// Clean input.
$.each(arguments, function(index, value) {
arguments[index] = value.replace(/[\W\s]+/g, '').toLowerCase();
});
Would that be a bad thing to do? I have no further use for the uncleaned arguments in the function, and it would be nice not to create a useless copy of arguments just to use…