Skip to content

Instantly share code, notes, and snippets.

@sgharms
Created September 19, 2011 23:48
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 sgharms/1227937 to your computer and use it in GitHub Desktop.
Save sgharms/1227937 to your computer and use it in GitHub Desktop.
Woman = (function() {
__extends(Woman, Primate);
function Woman(name) {
this.name = name != null ? name : 'Eve';
this.likes = [];
}
Woman.prototype.supply_likes = function() {
this.likes.push("someStuff");
return this.likes.push("someOtherStuff");
};
Woman.prototype.describe = function() {
return "A " + this.getPrototypeOf + " is a creature that likes: " + (this.likes.join(', '));
};
return Woman;
})();
first_woman = new Woman;
first_woman.supply_likes();
console.log(first_woman.describe());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment