Created
May 7, 2017 10:12
-
-
Save lenafaure/f9c11f3ecee4ad2da5a4738378b3fdb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var customer = { | |
firstName: "John", | |
lastName: "Doe", | |
greetCustomer: function(){ | |
// We use "this" instead of repeating "customer" | |
console.log("Hello again " + this.firstName + " " + this.lastName + "!"); | |
} | |
} | |
customer.greetCustomer(); // Prints "Hello again John Doe!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment