Backbone.JS Router Initialize()

The Backbone.JS Router Initialize() method creates a new constructor. This purpose is served for the router installation.

Syntax:

new Router (options)   

Parameters:
options: This parameter is used to specify the values to be passed to the function.

Example:

  

  
Example  
  
  
  
  
  
  
  
  

Output:

Called Route 1.

Explanation:
In the above example, the new keyword is the instantiation of the router.