ELI5: Explain Like I'm 5

Closure (computer science)

In computer science, a closure is like a special kind of box with a secret inside. Anytime you try and open the box, the secret inside will get used. Think of it like a secret recipe, where you can open the box and get the recipe out.

To put it more simply, a closure is a combination of a function (the box) and the environment (the secret inside) in which it was created. When you call the function, it remembers the environment that it was created in and can access whatever it needs from it.