var a=3,b=4;function h(a,b){return a+b};console.dir(h)function h(a.b)arguments: null 这个为啥是nullcaller: nulllength: 2name: "h"prototype:Object__proto__: function()<function scope>
1 回答

叮当猫咪
TA贡献1776条经验 获得超12个赞
function abc(x,y,z){ return arguments;};
console.dir(abc);
/*
abc(x, y, z)
arguments: null //没调用时没有
caller: null
length: 3 //如果要获取参数个数,应该用 length
name: "abc"
prototype: abc__proto__: ()<function scope>
*/
console.dir(abc(1,2,3));
/*
[1, 2, 3]
0: 1
1: 2
2: 3
callee: abc(x,y,z)
length: 3
*/
添加回答
举报
0/150
提交
取消