Home » Backbone.js collection.unshift()

Backbone.js collection.unshift()

by Online Tutorials Library

Backbone.js collection.unshift()

The Backbone.js collection unshift method is used to add specified model at the beginning of a collection. It takes the same options as add() method.

Syntax:


Parameter explanation:

models: It specifies the names of the collection instances, which is to be added at the beginning of a collection.

options: It contains model types and adds them to the collection instance.

See this example:

You may also like