Skip to content

Instantly share code, notes, and snippets.

@lenafaure
Created May 7, 2017 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenafaure/b0ec981533da15486e37a2ad04bde322 to your computer and use it in GitHub Desktop.
Save lenafaure/b0ec981533da15486e37a2ad04bde322 to your computer and use it in GitHub Desktop.
var cat = "Alphonse";
// The variable cat is actually attached to the global window object :
console.log(window.cat === cat); // Prints true
// "this" in the global context has the value of the global window object
console.log(this); // Prints the window object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment