Backbone.JS Router Execute()

The Backbone.JS Router Execute() method is used when a route matches its corresponding callback.

Syntax:

Backbone.Router.Execute (callback, args)   

Parameters:
callback: This parameter is used to specify the function to be executed when the route matches.
args: This parameter is used to specify the arguments to be passed with the method.

Example:

  

  
Example  
  
  
  
  
  
  
  

Output:

●	Route 1
●	Route 2

Explanation:
In the above example the Execute() method is called internally when route matches its callback.