Skip to content

Commit 73ce6f8

Browse files
committed
work
1 parent 28d3b85 commit 73ce6f8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

1-js/5-deeper/2-closure/3-function-in-if/task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
# Function in if
3+
24
Look at the code. What will be result of the call at the last line?
35

46
```js run

1-js/5-deeper/2-closure/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ But properties like `counter.count` have nothing in common with function variabl
346346

347347
Which approach is better?
348348

349-
The main difference is that if the value of `count` lives in a variable, then an external code is unable to access it. Only the nested function may modify it.
349+
The main difference is that if the value of `count` lives in a variable, then an external code is unable to access it. Only the nested function may modify it. Such variables are sometimes called *private* (to the function).
350350

351351
And if it's bound to function, then such thing is possible:
352352

0 commit comments

Comments
 (0)