javascript get function argument count code example
Example: get function parameters count javascript
function foo(a, b) {
for (var i=0;i<arguments.length;i++) {
console.log(arguments[i]);
}
}
console.log(foo.length); // reports 2, even though `foo` can access all your arguments!