Skip to content

Instantly share code, notes, and snippets.

@brookr
Created March 9, 2012 18:27
Show Gist options
  • Select an option

  • Save brookr/2007896 to your computer and use it in GitHub Desktop.

Select an option

Save brookr/2007896 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.name // --> "Thomas"
Person.prototype.name = "Amy"
delete thomas.name
thomas.name
delete Person.prototype.getName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment