JaveScript中caller和callee的区别
1.caller返回调用当前函数的函数调用
1.这个属性只有在函数调用时才有用
2.如果在js程序中,函数是由顶层调用的话,则返回null
function a(){
console.log(a.caller);
}
function b(){
a();
}
b();//function b(){ a(); }
a();//null
2.callee返回正在执行的函数本身的引用,它是argueme...
原创
2018-12-16 22:05:39 ·
89 阅读 ·
0 评论