![]() |
VOOZH | about |
The Backbone.js clone Collection is a function used to form a new instance of the collection with an identical list of models. This method returns a copy of the collection and initiates a new instance of the collection with its list of models.
Syntax:
collection.clone() ;
Parameters: This method doesn't take any argument.
Example 1: In this example, we will illustrate the Backbone.js clone Collection. We will copy one collection and initiate a new instance.
Output:
Example 2: In this example, we will clone one collection and see whether methods are copied or not.