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
闭包是由函数以及创建该函数的词法环境组合而成的,这个环境包含了闭包创建时能够访问的所有局部变量。 函数连同它作用域链上的要使用的变量共同构成闭包,简单来说,函数1中返回了函数2,而函数2中用到了函数1中的局部变量,这就构成了闭包。 一般情况下使用闭包是为了封装数据和暂存数据,也可以让对象拥有私有属性。 题目来自饥人谷
The text was updated successfully, but these errors were encountered:
No branches or pull requests
闭包是由函数以及创建该函数的词法环境组合而成的,这个环境包含了闭包创建时能够访问的所有局部变量。
函数连同它作用域链上的要使用的变量共同构成闭包,简单来说,函数1中返回了函数2,而函数2中用到了函数1中的局部变量,这就构成了闭包。
一般情况下使用闭包是为了封装数据和暂存数据,也可以让对象拥有私有属性。
题目来自饥人谷
The text was updated successfully, but these errors were encountered: