From 73ce6f8a2437f87f2aa5d5620eb06c0a6a84c30b Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sat, 16 Jul 2016 17:53:12 +0300 Subject: [PATCH] work --- 1-js/5-deeper/2-closure/3-function-in-if/task.md | 2 ++ 1-js/5-deeper/2-closure/article.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/1-js/5-deeper/2-closure/3-function-in-if/task.md b/1-js/5-deeper/2-closure/3-function-in-if/task.md index 14c2fe21..d0dbbeb1 100644 --- a/1-js/5-deeper/2-closure/3-function-in-if/task.md +++ b/1-js/5-deeper/2-closure/3-function-in-if/task.md @@ -1,4 +1,6 @@ +# Function in if + Look at the code. What will be result of the call at the last line? ```js run diff --git a/1-js/5-deeper/2-closure/article.md b/1-js/5-deeper/2-closure/article.md index b42c503d..4a89c880 100644 --- a/1-js/5-deeper/2-closure/article.md +++ b/1-js/5-deeper/2-closure/article.md @@ -346,7 +346,7 @@ But properties like `counter.count` have nothing in common with function variabl Which approach is better? -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. +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). And if it's bound to function, then such thing is possible: