I am new to JavaScript, and I am struggling with how to change an arrow function with non-arrow function... Please help, and thank you very much in advance!
this.middleware(req,res,()=>{
this.processRoutes(req,res);
});
I am new to JavaScript, and I am struggling with how to change an arrow function with non-arrow function... Please help, and thank you very much in advance!
this.middleware(req,res,()=>{
this.processRoutes(req,res);
});
This is how you can do it.
this.middleware = function(req,res) {
this.processRoutes(req,res);
};
However you should use arrow function unless you have any specific reason for not to use it.