The Backbone.JS Destroy() model destroys or removes a model from the server.
Syntax:
Model.Destroy (options)
Parameters:
options: This parameter is used to specify the options like id, name etc. for a model.
Example:
Model Example
Output:
create: {"msg1":"HELLO WORLD.","msg2":"Welcome."} delete: {"msg1":"HELLO WORLD.","msg2":"Welcome.","id":100}
Explanation:
In the above example, the properties of a model are created, saved and Destroyed.