Javatpoint Logo
Javatpoint Logo

Backbone.js collection.shift()

The Backbone.js collection shift method is used to remove and return the first model form the collection. It takes the same option as remove() method.

Syntax:


Parameter explanation:

options:It specifies the model type which will be removed from the collection.

Let's take an example.

See this example:

Test it Now

Output:

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

BackboneJS shift Collection
Next TopicBackbone.js Slice





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