init
This commit is contained in:
parent
06f61d8ce8
commit
f301cb744d
2271 changed files with 103162 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
Нет, нельзя.
|
||||
|
||||
Локальная переменная полностью перекрывает внешнюю.
|
|
@ -0,0 +1,17 @@
|
|||
# Перекрытие переменной
|
||||
|
||||
[importance 4]
|
||||
|
||||
Если во внутренней функции есть своя переменная с именем `currentCount` -- можно ли в ней получить `currentCount` из внешней функции?
|
||||
|
||||
```js
|
||||
function makeCounter() {
|
||||
var currentCount = 1;
|
||||
|
||||
return function() {
|
||||
var currentCount;
|
||||
// можно ли здесь вывести currentCount из внешней функции (равный 1)?
|
||||
};
|
||||
}
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue