Created
March 9, 2012 18:35
-
-
Save ryanahamilton/2007927 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(name){ | |
this.name = name; | |
} | |
Person.prototype.getName = function() { | |
return this.name; | |
} | |
var thomas = new Person('Thomas'); | |
var amy = new Person('Amy'); | |
Person.name = Amy; | |
console.log(thomas.getName()); | |
delete Person.prototype.getName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment