In JS, functions can refer to variables defined in outer scopes, and can refer to variables defined in outer functions even after those functions have returned. JS functions are first-class objects.
They also store any variables they may refer to that are defined in their enclosing scopes, including the parameters and variables of outer functions.
They also store any variables they may refer to that are defined in their enclosing scopes, including the parameters and variables of outer functions.