Backbone.js collection.create()

The Backbone.js collection create method is used to create a new instance of the model in the collection.

Syntax:


Parameter explanation:

attributes: It specifies the property of a defined model.

options: It specifies the parameters like id, name etc. to create the collection instance.

Let's take an example to deploy the create method.

See this example:

Test it Now

Output:

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

BackboneJS Create Collection



Latest Courses