You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/5-deeper/2-closure/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,7 +346,7 @@ But properties like `counter.count` have nothing in common with function variabl
346
346
347
347
Which approach is better?
348
348
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).
350
350
351
351
And if it's bound to function, then such thing is possible:
0 commit comments