Created
November 13, 2019 13:53
-
-
Save erdemuslu/9a39228c95f2c888d04a99fac064fe30 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
const User = function(firstName, lastName) { | |
this.fistName = firstName; | |
this.lastName = lastName; | |
} | |
User.prototype.sayHello = function() { | |
console.log(`Hello ${this.firstName} ${this.lastName}`); | |
} | |
const user1 = new User('Erdem', 'Uslu'); | |
const user2 = new User('John', 'Smith'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment