在js中函数本身也是对象。
1.获取形参数量。
var test = function(a,b,c,d) {
console.log(arguments.length);//2
}
test(1,2);
console.log(test.length);//4
在js中函数本身也是对象。
1.获取形参数量。
var test = function(a,b,c,d) {
console.log(arguments.length);//2
}
test(1,2);
console.log(test.length);//4