mozilla

Compare Revisions

Inheritance revisited

Change Revisions

Revision 56929:

Revision 56929 by ericbock on

Revision 56930:

Revision 56930 by satyr on

Title:
Inheritance revisited
Inheritance revisited
Slug:
JavaScript/Guide/Inheritance_Revisited
JavaScript/Guide/Inheritance_Revisited
Tags:
JavaScript, OOP, Inheritance
JavaScript, OOP, Inheritance
Content:

Revision 56929
Revision 56930
t117function extend(child, super){t117function extend(child, supertype){
118  for (var property in super.prototype) {118  for (var property in supertype.prototype) {
119    if (typeof child.prototype[property] == "undefined")119    if (!(property in child.prototype))
120      child.prototype[property] = super.prototype[property];120      child.prototype[property] = supertype.prototype[property];

Back to History