Object.getOwnPropertyNames(Function.arguments).sort().forEach(function(val){
console.log(val);
})arguments应该有callee的属性,为什么我这样无法遍历出来这个属性呢,而且还会报错
1 回答

侃侃无极
TA贡献2051条经验 获得超10个赞
Function.arguments
这是啥?
你要取函数的实参也不能这么写呀,都没传怎么取。
我觉得你可能是这个意思
Object.getOwnPropertyNames(function() { return arguments; }())//匿名函数自调用使能够使用函数内部的arguments特性,并将其返回 .sort() .forEach(function(val) { console.log(val); })
添加回答
举报
0/150
提交
取消