Skip to content

Commit c0c15ae

Browse files
authored
Добавление задачи "Видна ли переменная?"
1 parent cae65de commit c0c15ae

File tree

1 file changed

+21
-0
lines changed
  • 1-js/06-advanced-functions/03-closure/7-let-scope

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
importance: 4
2+
3+
---
4+
5+
# Видна ли переменная?
6+
7+
Что выведет данный код?
8+
9+
```js
10+
let x = 1;
11+
12+
function func() {
13+
console.log(x); // ?
14+
15+
let x = 2;
16+
}
17+
18+
func();
19+
```
20+
21+
P.S. В этой задаче есть подвох. Решение не очевидно.

0 commit comments

Comments
 (0)