up
This commit is contained in:
parent
4e9f302982
commit
b6adf0b6aa
9 changed files with 51 additions and 106 deletions
|
@ -7,8 +7,8 @@ importance: 5
|
|||
Modify the code of `makeCounter()` so that the counter can also decrease and set the number:
|
||||
|
||||
- `counter()` should return the next number (as before).
|
||||
- `counter.set(value)` should set the `count` to `value`.
|
||||
- `counter.decrease()` should decrease the `count` by 1.
|
||||
- `counter.set(value)` should set the counter to `value`.
|
||||
- `counter.decrease()` should decrease the counter by 1.
|
||||
|
||||
See the sandbox code for the complete usage example.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue