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
function foo() { let value = 1; function bar() { console.log(value); } // error,正确的应该是return bar return bar(); } const baz = foo(); // 这就是闭包的作用,调用 foo 函数,就会执行里面的 bar 函数,foo 函数这时就会访问函数外层的变量 baz();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: