Skip to content

Instantly share code, notes, and snippets.

@mkuklis
Created June 23, 2011 16:35
Show Gist options
  • Save mkuklis/1042935 to your computer and use it in GitHub Desktop.
Save mkuklis/1042935 to your computer and use it in GitHub Desktop.
classical inheritance
function inherit(C, P) {
var F = function () {};
F.prototype = P.prototype;
C.prototype = new F();
C._super = P.prototype;
C.prototype.constructor = C;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment