Skip to content

Instantly share code, notes, and snippets.

@sp-niemand
Created February 22, 2014 14:08
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 sp-niemand/9155419 to your computer and use it in GitHub Desktop.
Save sp-niemand/9155419 to your computer and use it in GitHub Desktop.
function A() {
}
var prot = A.prototype;
prot.a = function () {
console.log('A::a()');
}
function B() {
}
B.prototype = A;
var prot = B.prototype;
prot.a = function () {
prot.prototype.a.apply(this, arguments);
console.log('B::b()');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment