Skip to content

Instantly share code, notes, and snippets.

@ryanahamilton
Created March 9, 2012 18:35
Show Gist options
  • Save ryanahamilton/2007927 to your computer and use it in GitHub Desktop.
Save ryanahamilton/2007927 to your computer and use it in GitHub Desktop.
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