Skip to content

Instantly share code, notes, and snippets.

@hay hay/ex4.js
Last active Dec 11, 2015

Embed
What would you like to do?
var Module = Stapes.subclass({
sayName : function() {
console.log('i say my name!');
}
});
var BetterModule = Module.subclass({
// Note that this method name is the same as the one in Module
sayName : function() {
BetterModule.parent.sayName.apply(this, arguments);
console.log('i say my name better');
}
});
var module = new BetterModule();
module.sayName(); // 'i say my name! i say my name better!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.