Skip to content

Instantly share code, notes, and snippets.

@ahmarsuhail
Last active July 16, 2019 18:18
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 ahmarsuhail/47ad519fd38713ad922f2e2d5bb5f963 to your computer and use it in GitHub Desktop.
Save ahmarsuhail/47ad519fd38713ad922f2e2d5bb5f963 to your computer and use it in GitHub Desktop.
const printNameOutsideOfObject = function() {
console.log(this.name);
}
printNameOutsideOfObject(); //The "this" here refers to the global window object, and not the user object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment