javascript function object's inheritFrom method
- by gawpertron
I've come across this.inheritFrom that enables you to inherit from a super class.
var superClass = function() {
this.foo = 'foo';
this.bar = 'bar';
}
var subClass = function() {
this.inheritFrom = superClass;
this.inheritFrom();
this.myFunction = function() {
return this.foo;
};
}
I've looked in Mozilla and…