Skip to content

Instantly share code, notes, and snippets.

@jcayzac
Created April 9, 2012 08:23
Show Gist options
  • Save jcayzac/2342284 to your computer and use it in GitHub Desktop.
Save jcayzac/2342284 to your computer and use it in GitHub Desktop.
var ParentClass = function() { }
ParentClass.prototype = {}
ParentClass.prototype.constructor = ParentClass;
var SubClass = function() {
ParentClass.prototype.constructor.apply(this, []);
};
SubClass.prototype = Object.create(ParentClass.prototype)
SubClass.prototype.constructor = SubClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment