Created
September 19, 2011 23:48
-
-
Save sgharms/1227937 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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