function ClassA() { this.a=[]; this.aa=100; }
function ClassB() { }
ClassB.prototype = new ClassA;
ClassB.prototype.b=function(){return "classbb"};
for (var l in ClassB.prototype){
Array.prototype[l] = ClassB.prototype[l];
}
var array1 = [];
alert(array1.b());
Can
Array.prototype[l] = ClassB.prototype[l]
be replaced by
Array.prototype[l] = ClassB[l]
? Could someone help me? Thanks.