Given this function:
function foo( a,b,c ) {
//
}
How can you do something, say use console.log() for each argument? I know you can see the arguments by using the arguments keyword. Arguments seems to return what looks like an Array (but is of type "object" [suprise.. not]) but it doesn't support .forEach, I am using Chrome.
I tried modifying the function to this, and expected it to work:
function foo( a,b,c ) {
arguments.forEach(function( arg ){
console.log( arg );
});
}
You get the error that TypeError: Object # has no method 'forEach'.