Collections
, such as Models
, have a number of methods inherited from Underscore, but Collections actually have a lot more methods than Models...28 methods to be exact. We can't possibly cover all these methods in detail here, so I'll just provide a quick summary of what each method does and then explore a few of the more important ones in depth.
Note that just as with the Underscore methods on Model, some of these methods operate on the attributes of the Models
inside the Collection
rather than on the Collection
or Models
themselves. At the same time, however, all the methods that return multiple results return plain old JavaScript arrays, not new Collections. This is done for performance reasons and shouldn't be an issue because if you need those results as a Collection, you can simply create a new one and pass in the results array.