Backbone.JS Has()

The Backbone.JS Has() model is used to get a true value, if the attribute value is defined with a non-null value or non-undefined value.

Syntax:

Model.has(attribute)  

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

Example:

 

  
Example  
  
  
  
  
  
  

Output:

We have one more message: True

Explanation: In this example the Backbone.JS has() model is giving a true value if MSG2 is present in Y.

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