-
第一层定义:闭包是基于词法作用域(或静态作用域)书写代码时所产生的自然结果
-
第二层定义:当函数在别处调用时,依然需要访问它的父作用域的变量
-
完整定义:当函数可以记住并访问所在的词法作用域, 即使函数是在当前词法作用域之外执行, 这时就产生了闭包
-
Notifications
You must be signed in to change notification settings - Fork 0
xiankui/i-know-js-closure
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
understanding javascript closure step by step
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published