classical inheritance 1
function Parent(name) { this.name = name || 'Adam'; } Parent.prototype.say = function() { return this.name; }; function Child() {} function inherit(C, P) { C.prototype = new P(); } inherit( Child, Parent );