Backbone.JS View Extend()

The Backbone.JS View Extend() method extends the backbone’s View class to create a custom view class.

Syntax:

Backbone.View.extend (properties, classProperties)   

Parameters:
properties: This parameter is used to specify the properties for instance for the View class.
classProperties: This parameter is used to specify the class properties for the constructor function of the View.

Example:

  

  
Example  
  
  
  
  
  
  
  


  

Output:

HELLO WORLD!!

Explanation:
In the above example the Extend() method is used to extend the backbone’s View class.