Backbone.JS set()

The Backbone.JS set() model sets the value of an attribute in the model.

Syntax:

Model.set(attribute)   

Parameters:
attribute: This parameter is used to define properties of a model.

Example:

  
 
   
Example  
  
  
  
  
  


  

Output:

The FIRST Message: HELLO

Explanation:
The Backbone.JS set() model is setting the value of the attributes in the model.