We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第378天 callee和caller的区别和作用是什么?
我也要出题
The text was updated successfully, but these errors were encountered:
arguments.callee 指的是当前函数 Function.caller 指的是调用当前函数的函数 举个例子:
function a() { console.log(arguments.callee); console.log(a.caller); } function b() { a(); } b(); a();
控制台输出: [Function: a] [Function: b] [Function: a] null
作用:可以用在需要函数自调用,或者调用父函数的场景下
Sorry, something went wrong.
No branches or pull requests
第378天 callee和caller的区别和作用是什么?
我也要出题
The text was updated successfully, but these errors were encountered: