Skip to content

Commit 91565e0

Browse files
authored
Merge pull request #1826 from glitch-surfer/patch-3
correct example
2 parents a8bd603 + 2b6f849 commit 91565e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function User(name) {
239239
}
240240

241241
let user = new User("John");
242-
user.sayHi(); // у кода метода "sayHi" есть доступ к внешней переменной "name"
242+
user.sayHi(); // "John" (у кода метода "sayHi" есть доступ к внешней переменной "name")
243243
```
244244
245245
А здесь мы просто создаём и возвращаем функцию "счётчик":

0 commit comments

Comments
 (0)