Skip to content

Commit d043b11

Browse files
committed
merge prs
1 parent 7888439 commit d043b11

File tree

26 files changed

+259
-139
lines changed

26 files changed

+259
-139
lines changed

1-js/06-advanced-functions/03-closure/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ In this example `count` is found on step `2`. When an outer variable is modifie
275275

276276
Here are two questions to consider:
277277

278-
1. Can we somehow reset the `counter` from the code that doesn't belong to `makeCounter`? E.g. after `alert` calls in the example above.
278+
1. Can we somehow reset the counter `count` from the code that doesn't belong to `makeCounter`? E.g. after `alert` calls in the example above.
279279
2. If we call `makeCounter()` multiple times -- it returns many `counter` functions. Are they independent or do they share the same `count`?
280280

281281
Try to answer them before you continue reading.
@@ -286,8 +286,8 @@ All done?
286286

287287
Okay, let's go over the answers.
288288

289-
1. There is no way. The `counter` is a local function variable, we can't access it from the outside.
290-
2. For every call to `makeCounter()` a new function Lexical Environment is created, with its own `counter`. So the resulting `counter` functions are independent.
289+
1. There is no way: `count` is a local function variable, we can't access it from the outside.
290+
2. For every call to `makeCounter()` a new function Lexical Environment is created, with its own `count`. So the resulting `counter` functions are independent.
291291

292292
Here's the demo:
293293

1-js/99-js-miscellaneous/index.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

2-ui/99-ui-miscellaneous/index.md

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.

2-ui/5-frames-and-windows/03-cross-window-communication/article.md renamed to 4-frames-and-windows/03-cross-window-communication/article.md

File renamed without changes.

2-ui/5-frames-and-windows/03-cross-window-communication/postmessage.view/iframe.html renamed to 4-frames-and-windows/03-cross-window-communication/postmessage.view/iframe.html

File renamed without changes.

2-ui/5-frames-and-windows/03-cross-window-communication/postmessage.view/index.html renamed to 4-frames-and-windows/03-cross-window-communication/postmessage.view/index.html

File renamed without changes.

2-ui/5-frames-and-windows/03-cross-window-communication/sandbox.view/index.html renamed to 4-frames-and-windows/03-cross-window-communication/sandbox.view/index.html

File renamed without changes.

2-ui/5-frames-and-windows/03-cross-window-communication/sandbox.view/sandboxed.html renamed to 4-frames-and-windows/03-cross-window-communication/sandbox.view/sandboxed.html

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)