BackboneJS - Collection Sort - Backbone.js

Description

The collection sort command sorts the items in the collection and uses the comparator property to sort the items.

Syntax

Parameters

  • options − It contains optional parameters such as true or false to disable or enable the sorting.

Example

Output

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

  • Save the above code in the sort.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