Thread of Execution
All code is executed within an execution context, or a specific environment. Code that is not embedded within a function will operate in the global execution context. Code within a function will operate within the execution context of that function. And once a function has been called and the thread of execution leaves that function call, the execution context of the function is deleted and no data is retained.
Exceptions to the above do not break this rule but make use of Closure.