Backbone.JS Clone()

The Backbone.JS Clone() collection method is used to get the shallow copy of the specified object.

Syntax:

Collection.Clone ( )   

Example:

  

  
Example  
  
  
  
  
  
  
  
  

Output:

New Collection's Instance: "Jerry Jones"

Explanation: In the above example, the Clone() method used the Get() method to retrieve the ‘name’ attribute of the model.

Please follow and like us:
Content Protection by DMCA.com