Javatpoint Logo
Javatpoint Logo

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:

Test it Now

Output:

Save the above code in unshift.html file and open this file in a new browser.

BackboneJS unshift Collection
Next TopicBackbone.js Shift





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA