The Backbone.JS Length() collection method counts the number of models in the collection.
Syntax:
Collection.Length
Example:
Example
Output:
Number of added numbers : 2
Explanation:
In the above example, the Length() method counts the number of added models to the collection.