update post: Closure and this - How are variables resolved within functions?

This commit is contained in:
2020-08-03 09:31:13 +05:30
parent 8b65418610
commit 567a8e144a
+1 -1
View File
@@ -136,7 +136,7 @@ function outer() {
} }
``` ```
(Actual implementations of closure in different engines will optimize the closure by only storing variables that are actually being used (if any). But the Ecmascript specification doesn't talk about those optimizations and tells you to directly store the whole scope, for all functions.) (Actual implementation of closure in different engines will optimize the closure by only storing variables that are actually being used (if any). But the Ecmascript specification doesn't talk about those optimizations and tells you to directly store the whole lexical scope, for all functions.)
## `this` lookup ## `this` lookup