Backbone.JS HasChanged()

The Backbone.JS HasChanged() model is used to get the TRUE value if the attributes have changed since the last set of the model attributes.

Syntax:

Model.HasChanged (attributes)   

Parameters: attributes: This parameter is used to specify the properties of a model.

Example:

  

  
Example  
  
  
  
  
  
  

Output:

MESSAGE has changed = false
MESSAGE has changed = true

Explanation: In the above example, message has changed after the set.

Please follow and like us:
Content Protection by DMCA.com