
The module pattern uses closures to create private variables that can't be accessed from outside. It's how we had encapsulation before ES6 classes!
createCounter() function (no args)increment(), decrement(), getCount(), reset()getCount() is the only way to read the valueSubmit your code to see test results