Google News
logo
Backbone - Interview Questions
What do you understand by the model.attributes in Backbone.js?
The Backbone.js attributes define a model's property and use the set() method to update the attributes. It is usually a form of the JSON object representing the model data on the server.
 
Syntax :
 
model.attributes    

Example :
<script type="text/javascript">    
  var  Person = Backbone.Model.extend();    
  var person = new Person();    
  person.set({ name: "Chanti"});    
  document.write(person.get('name'));   
</script>
Advertisement