![]() |
VOOZH | about |
The Backbone.js models Collection is used to access the JavaScript array of models inside the collection. The model object can be accessed with the use of 'get' or 'at' but we can use models to direct reference to the array.
Syntax:
collection.models;
Parameters: It doesn't take any parameters.
Example 1: In this example, we will illustrate the Backbone.js models Collection. Here we will see the model's attribute of collection.
Output:
Example 2: In this example, we will use Collection.models property of Collection to reference an array of models.