Created
April 7, 2016 08:30
-
-
Save codemilli/00adb482005df2e335749c788644e587 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Person { | |
| constructor(firstName, lastName) { | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| } | |
| hello () { | |
| console.log(`My name is ${this.firstName} ${this.lastName}`); | |
| } | |
| } | |
| let moon = new Person('Jooyoung', 'Moon'); | |
| moon.hello(); // My name is Jooyoung Moon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment