A closure is a special kind of object that combines two things: a function, and the environment in which that function was created. The environment consists of any local variables that were in-scope at the time that the closure was created.

https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Closures