大家好,有人可以解释一下为什么在backbone示例应用程序(http://backbonejs.org/examples/todos/index.html)中,在remaining()函数中使用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]