Skip to content

Instantly share code, notes, and snippets.

@demimismo
Created July 29, 2010 20:00
Show Gist options
  • Save demimismo/499077 to your computer and use it in GitHub Desktop.
Save demimismo/499077 to your computer and use it in GitHub Desktop.
// 1
var Person = function(name) {
this.name = name;
}
// 2
Person.prototype.getName = function() {
return this.name;
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
thomas.getName();
// 3
thomas.getName.call(amy);
// 4
delete Person.prototype.getName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment