Skip to content

Instantly share code, notes, and snippets.

@lenafaure
Created May 7, 2017 10:44
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/def128b9cefd2065e3d40029b86fbe3a to your computer and use it in GitHub Desktop.
Save lenafaure/def128b9cefd2065e3d40029b86fbe3a to your computer and use it in GitHub Desktop.
var customer = {
firstName: "John",
lastName: "Doe",
greetCustomer: function(){
console.log("Hello again " + this.firstName + " " + this.lastName + "!");
function nestedFunction(){
console.log(this);
}
nestedFunction();
}
}
customer.greetCustomer(); // Prints the window object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment