Whenever you're ready, walk me through how you'd approach this.
Explain what a closure is in JavaScript and give an example of where you would use it in a frontend codebase.