Function finished, Execution contexts are gone, why can I still access its variable?
As we can say, the execution context is closed in its outer variables. This phenomenon: a function closing in all the variables that it’s supposed to have access to, is called a closure.
The scope is intact
Closures are just a feature to make sure that functions has access to their outer variables, it doesn’t matter whether the outer functions have finished running or not.
create a function factory: