Complete the function createCounter
such that the count
variable can be incremented and decremented from outside the function but make sure that count
remains private to createCounter
and is not exposed to the global scope.
After completing the function,
- Increment the value by 5 and log it to the console.
- Decrement the value by 2 and log it to the console.