Skip to content

Commit ebd31dd

Browse files
committed
translated task 2
1 parent 82545dd commit ebd31dd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
The solution uses `count` in the local variable, but addition methods are written right into the `counter`. They share the same outer lexical environment and also can access the current `count`.
2+
Soluția folosește `count` în variabila locală, dar metodele de adăugare sunt scrise direct în `counter`. Acestea împart același mediu lexical extern și pot accesa de asemenea `count` curent.

1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/task.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ importance: 5
22

33
---
44

5-
# Set and decrease for counter
5+
# Set și decrease pentru counter
66

7-
Modify the code of `makeCounter()` so that the counter can also decrease and set the number:
7+
Modificați codul din `makeCounter()` astfel încât numărătorul să poată de asemenea să scadă și să seteze numărul:
88

9-
- `counter()` should return the next number (as before).
10-
- `counter.set(value)` should set the counter to `value`.
11-
- `counter.decrease()` should decrease the counter by 1.
9+
- `counter()` ar trebui să returneze următorul număr (ca înainte).
10+
- `counter.set(value)` ar trebui să seteze counter la `value`.
11+
- `counter.decrease()` ar trebui să scadă counter cu 1.
1212

13-
See the sandbox code for the complete usage example.
13+
Consultați codul sandbox pentru exemplul complet de utilizare.
1414

15-
P.S. You can use either a closure or the function property to keep the current count. Or write both variants.
15+
P.S. Puteți utiliza fie un closure sau proprietatea funcției pentru a păstra numărul curent. Ori scrieți ambele variante.

0 commit comments

Comments
 (0)