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
请谈谈你对闭包的理解。
The text was updated successfully, but these errors were encountered:
在 JavaScript 中,根据词法作用域的规则,内部函数总是可以访问其外部函数中声明的变量,当通过调用一个外部函数返回一个内部函数后,即使该外部函数已经执行结束了,但是内部函数引用外部函数的变量依然保存在内存中,把这些变量的集合称为闭包。
Sorry, something went wrong.
内部函数访问了外部函数作用域中的变量后,并且在全局作用域中能访问该内部函数,那么即使外部函数执行结束了,这些变量还会滞留在内存中。
No branches or pull requests
请谈谈你对闭包的理解。
The text was updated successfully, but these errors were encountered: