Skip to content

Instantly share code, notes, and snippets.

@doubleclickdetroit
doubleclickdetroit / example.js
Created January 11, 2012 19:16
JS Inheritance
function Person(name) {
this.name = name;
}
Person.prototype.getName = function() {
return this.name;
};
function Author(name, books) {
Author.superClass.constructor.call(this, name);
this.books = books;