Any variables or functions defined within a context, are loaded onto this variable object. The variable object is deleted whenever the browser exits an executing context. Therefore, all variables and functions that are local to an executing context are destroyed upon exiting the context. There is no way to access the variable object. When you access variables and functions, you actually access the variable object's parameters and methods.
Global code is any code that is outside functions.
Function code is code within a function definition. When the browser switches a context, a new scope is determined. The scope determines which variables, objects, and functions are accessible from the execution context. The scope is determined solely by the the variable object that is being created upon entering the new execution context, and destroyed upon leaving it. The variable object holds variables and functions that are currently active.