[Leetcode] JS 30 Counter II
Question 2665
arrow function/pre-increment operators/return object of functions
Question
Write a function createCounter. It should accept an initial integer init. It should return an object with three functions.
The three functions are:
* increment() increases the current value by 1 and then returns it.
* decrement() reduces the current value