Created
February 20, 2012 09:15
-
-
Save PirosB3/1868524 to your computer and use it in GitHub Desktop.
differences? when should I use one or the other?
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
function TestMe(name) { | |
this.name = name; | |
} | |
TestMe.prototype.sayHello = function() { | |
return "Hello my name is " + this.name; | |
} | |
testme = function(name) { | |
return { | |
sayHello: function() { | |
return "Hello, my name is " + name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment