Created
October 26, 2010 04:50
-
-
Save dwaite/646341 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 MyObject(name) { | |
this.name = name | |
} | |
MyObject.prototype.toString = function() { return "My name is " + this.name } | |
> a = new MyObject("node") | |
> a.toString() | |
My name is node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment