嗨,有人可以解释为什么在剩余()函数中的骨干示例应用程序( http://backbonejs.org/examples/todos/index.html)中,使用 apply ( this.without.apply(this, this.done() ); ) 而不是this.without(this.done())
// Filter down the list of all todo items that are finished.
done: function() {
return this.where({done: true});
},
// Filter down the list to only todo items that are still not finished.
remaining: function() {
return this.without.apply(this, this.done());
},
谢谢你 !
#更新
调试器输出
this.without(this.done())
[child, child, child, child]
this.without.apply(this, this.done());
[child, child, child]