Quick Ref: Scopes, Closures, & Execution Contexts

Variable: Name binding for data or functions. Variables are created at delcaration. Local variables are deleted when the function ends. Global variables are deleted when you close the page.

Scope: The set of variables that are available in your current location based on functions. There are three types of scope: local, global, and closure.

Local Scope: Variables declared inside a function and can only be accessed inside said function. The arguments object is only part of the local scope.

Global Scope: Variables declared implicity, without a 'var,' are available everywhere.

Closure: Inner function that has access to its own scope plus the 'enclosing' functions' scopes plus global scope.

Context/This: You are here. Similar to scope, but pertaining to objects. This is an object references to your current location, the object that contains the code that is executing. Rule of thumb: 'this' refers to the left of the dot.

Hoisting: Declaring a function without an equals (function a() {}; versus a = function() {};). JavaScript hoists declarations, not initializations, to the top of the file.

Further Reading:
Ryan Morr Todd Motto