apply call
function a(...Obj){
trace(this.g);
var m=0;
for each(var i in Obj){
m+=1;
trace(m);
}
}
function b(...Obj){
this.g=3;
a.apply(this,Obj);
}
b(1,2,3,4);
还有 ...Obj的传递。
apply call
function a(...Obj){
trace(this.g);
var m=0;
for each(var i in Obj){
m+=1;
trace(m);
}
}
function b(...Obj){
this.g=3;
a.apply(this,Obj);
}
b(1,2,3,4);
还有 ...Obj的传递。
转载于:https://www.cnblogs.com/mattins/archive/2012/08/22/2651319.html