Functions are first-class objects, i.e. they are objects and can be manipulated and passed around like just like any other object. Specifically, they are Function
objects.
A closure is an expression (typically an inner function) that can have free variables together with an environment that binds those variables (that “closes” the expression).
Inner functions have access to the variables of their enclosing outer function, but after running the outer function, you can’t have access to modify their inner scope, just to use it.
Be careful with closures: they could occupy memory without the possibility of being clear out until next page reload.