Created
June 19, 2020 12:37
-
-
Save adrianmarkperea/91176bf5c263cc6b3c77d81279fddeec 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
Person.prototype.sayHi = function() { | |
console.log(`Hi! I'm ${this.firstName}`); | |
} | |
// Note that we did not recreate the objects here | |
personA.sayHi(); // Hi! I'm Adrian | |
personB.sayHi(); // Hi! I'm Be |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment