apply 获取一个参数数组:
鉴于arguments = [1,2,3]。
this.fn.apply(this, arguments);
会给你:
this.fn(1,2,3);
但:
this.fn(arguments);
会给你:
this.fn( [1,2,3] );
apply 获取一个参数数组:
鉴于arguments = [1,2,3]。
this.fn.apply(this, arguments);
会给你:
this.fn(1,2,3);
但:
this.fn(arguments);
会给你:
this.fn( [1,2,3] );