Skip to content

Instantly share code, notes, and snippets.

@craigtaub
Last active September 11, 2015 11:12
Show Gist options
  • Save craigtaub/733e5bac0dbebe3e5b98 to your computer and use it in GitHub Desktop.
Save craigtaub/733e5bac0dbebe3e5b98 to your computer and use it in GitHub Desktop.
Sum up
Context:
- object based..ref to object which owns current executing code
- look out for implicit binding
- 'new' operator causes function to be called with 'this' bound to newly created object
Scope:
- function based..can be in function or Global
Prototype chain:
- delegates up prototype chain to function Object.
instanceDog -> Dog.prototype -> Animal.prototype -> Object.prototype
Closure:
- function which has acccess to scope/variable of outer function
- module pattern uses it
- lexical scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment