BackboneJS - Collection Reset - Backbone.js

Description

It resets the collection and populates with the new array of models or will empty the entire collection.

Syntax

Parameters

  • models − It contains the names of the collection instances, which need to be reset in the collection.
  • options − The options include null value to empty the collection.

Example

Output

Let us carry out the following steps to see how the above code works −

  • Save the above code in the reset.htm file.
  • Open this HTML file in a browser.

Output

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Backbone.js Topics