Skip to content

Instantly share code, notes, and snippets.

@jonchretien
Created April 2, 2013 13:58
Show Gist options
  • Save jonchretien/5292400 to your computer and use it in GitHub Desktop.
Save jonchretien/5292400 to your computer and use it in GitHub Desktop.
Spotify Tech Talk
function inherit(Subclass, Superclass) {
function F() {}
F.prototype = Superclass.prototype;
Subclass.prototype = new F();
return Subclass;
}
function Person() {
// do complex stuff here
}
function Employee() {
Person.call(this);
}
inherit(Employee, Person);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment