Backbone.JS Remove() collection

The Backbone.JS Remove() collection method removes a model or array of models from a collection.

Syntax:

Backbone.Collection.Remove ( models, options )   

Parameters:
models: This parameter is used to specify the models to be removed from the collection.
options: This parameter is used to specify the model types.

Example:

  

  
Example  
  
  
  
  
  
  
  
  

Output:

Number of added numbers : 3
Number of remaining numbers : 2

Explanation:
In the above example, Remove() method removes one model from a collection.