File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
1-js/06-advanced-functions/03-closure/3-counter-independent Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- The answer : ** 0,1.**
1+ Răspunsul : ** 0,1.**
22
3- Functions ` counter ` and ` counter2 ` are created by different invocations of ` makeCounter ` .
3+ Funcțiile ` counter ` și ` counter2 ` sunt create prin invocări diferite ale lui ` makeCounter ` .
44
5- So they have independent outer Lexical Environments, each one has its own ` count ` .
5+ Deci ele au Medii Lexicale exterioare independente, fiecare având propriul ` count ` .
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ importance: 5
22
33---
44
5- # Are counters independent ?
5+ # Sunt contoarele independente ?
66
7- Here we make two counters : ` counter ` and ` counter2 ` using the same ` makeCounter ` function .
7+ Aici facem două contoare : ` counter ` și ` counter2 ` folosind aceeași funcție ` makeCounter ` .
88
9- Are they independent? What is the second counter going to show ? ` 0,1 ` or ` 2,3 ` or something else ?
9+ Sunt ele independente? Ce va arăta cel de-al doilea contor ? ` 0,1 ` sau ` 2,3 ` sau altceva ?
1010
1111``` js
1212function makeCounter () {
You can’t perform that action at this time.
0 commit comments