Fix issue with example code

Adjust initCounter's returned reset method to fit the idea it's trying to illustrate, of resetting the counter value
This commit is contained in:
Leonardo Diehl
2021-04-12 22:30:02 -03:00
committed by GitHub
parent 2a45fca0a4
commit b3b878f3b3

View File

@ -35,7 +35,7 @@ const initCounter = (start = 0) => {
get: () => value, get: () => value,
increment: () => ++value, increment: () => ++value,
decrement: () => --value, decrement: () => --value,
reset: () => start reset: () => value = start
}; };
} }