Skip to content

Instantly share code, notes, and snippets.

@nborwankar
Created July 29, 2010 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nborwankar/499091 to your computer and use it in GitHub Desktop.
Save nborwankar/499091 to your computer and use it in GitHub Desktop.
var Person = function(name){
this.name = name;
Person.prototype.getName = function(){ return this.name};
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
thomas.getName();
amy.getName();
// not quite sure how to do 3
// 4.
delete Person.prototype.getName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment