Google News
logo
Express.js - Interview Questions
Mention the arguments that are available in an Express JS route handler function.
The arguments which are available to an Express JS route handler-function are :
 
Req : the request object
Res : the response object
Next (optional) : a function that is employed to pass management to 1 of the following route handlers.

The third argument is optional and should be omitted, however, in some cases, it’s helpful wherever there’s a series of handlers and management will be passed to 1 of the following route handlers skipping this one.
Advertisement