We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a130ac commit 46d3a2aCopy full SHA for 46d3a2a
1-js/06-advanced-functions/03-closure/article.md
@@ -303,7 +303,7 @@ let counter = makeCounter();
303
```smart header="闭包"
304
开发者通常应该都知道“闭包”这个通用的编程术语。
305
306
-[闭包](https://en.wikipedia.org/wiki/Closure_(computer_programming)) 一个记住其外部变量并可以访问这些变量的函数。在某些编程语言中,这是不可能的,或者应该以一种特殊的方式编写函数来实现。但是如上所述,在 JavaScript 中,所有函数都是天生闭包的(只有一个例外,将在 <info:new-function> 中讲到)。
+[闭包](https://en.wikipedia.org/wiki/Closure_(computer_programming)) 是指一个函数可以记住其外部变量并可以访问这些变量。在某些编程语言中,这是不可能的,或者应该以一种特殊的方式编写函数来实现。但如上所述,在 JavaScript 中,所有函数都是天生闭包的(只有一个例外,将在 <info:new-function> 中讲到)。
307
308
也就是说:JavaScript 中的函数会自动通过隐藏的 `[[Environment]]` 属性记住创建它们的位置,所以它们都可以访问外部变量。
309
0 commit comments