Last active
October 4, 2016 19:52
-
-
Save tcrosen/89316395bb58fa9d5a66 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(props) { | |
| this.firstName = props.firstName || 'John'; | |
| this.lastName = props.lastName || 'Doe'; | |
| } | |
| getFullName() { | |
| return this.firstName + ' ' + this.lastName; | |
| } | |
| } | |
| console.log(new Person().getFullName()); // John Doe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment