我将CoffeeScript与JS拼接函数一起使用。我对JS拼接函数的理解是,它应该返回拼接出来的对象并修改原始数组。这对于简单的数组似乎工作得很好,但是当我开始向数组添加对象时,事情就崩溃了。下面是一个带注释的简化案例:#Class that will go in array do: ->
a = new Thingdo() # t
我使用了如下拼接方法。但它切分了数组的下一项。$.each(array, function (i, item) { jQuery.each(array2, function (index,if (idata.Id == user.UserId) { return false; // this stops the each