Google News
logo
Backbone - Quiz(MCQ)
Which of the following models can be created by extending Backbone.js?
A)
var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo1)); var todo2 = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));
B)
var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo11)); var todo = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));
C)
var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo11)); var todo = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));
D)
None of the Above

Correct Answer :   var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo1)); var todo2 = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));

Advertisement