…g o
ur variab
les in global scope, this would allow them to be tampered with outside of our function. A better solution is to use a closure, a
…g our variables in global scope, this would allow them to be tampered with outside of our function. A better solution is to use a closure, and that means returning a function: