Created
November 13, 2019 14:17
-
-
Save erdemuslu/a3dffa8bf04be3ddc30d9cbc56da9f77 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
class User { | |
constructor(firstName, lastName) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
sayHello() { | |
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