Created
December 21, 2015 10:58
-
-
Save codeaholicguy/c137cef2b98737100fc3 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
function Person(lastName, firstName) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
Person.prototype.toString = function personToString() { | |
return this.firstName + ' ' + this.lastName; | |
} | |
var person = new Person('Hoang', 'Nguyen'); | |
console.log('The person is ' + person); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment