Write a function named createCounter
that receives a number as a parameter.
The function should return an object representing a counter, with the following 3 properties:
getValue
that returns the current value of the counterincrement
that increases the counter value by 1decrement
that decreases the counter value by 1const counter = createCounter(11);
counter.increment();
counter.increment();
counter.increment();
console.log(counter.getValue()); // should print 14
counter.decrement();
console.log(counter.getValue()); // should print 13