apply?獲取一個參數(shù)數(shù)組:
鑒于arguments = [1,2,3]叉弦。
this.fn.apply(this, arguments);
會給你:
this.fn(1,2,3);
但:
this.fn(arguments);
會給你:
this.fn( [1,2,3] );
apply?獲取一個參數(shù)數(shù)組:
鑒于arguments = [1,2,3]叉弦。
this.fn.apply(this, arguments);
會給你:
this.fn(1,2,3);
但:
this.fn(arguments);
會給你:
this.fn( [1,2,3] );