what is backbone js used for code example
Example: backbone js
var ships = new Backbone.Collection;
ships.on("add", function(ship) {
alert("Ahoy " + ship.get("name") + "!");
});
ships.add([
{name: "kjnFlying Dutchman"},
{name: "Black Pearl"}
]);