Skip to content

Instantly share code, notes, and snippets.

@mmurray
Created May 30, 2011 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mmurray/998761 to your computer and use it in GitHub Desktop.
Save mmurray/998761 to your computer and use it in GitHub Desktop.
var A = function(){};
A.prototype.foo = function(){
console.log('foo');
}
var B = function(){};
B.prototype.bar = function(){
console.log('bar');
}
var C = function(){}
C.prototype.foo = A.prototype.foo;
C.prototype.bar = B.prototype.bar;
var _c = new C();
_c.bar();
_c.foo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment