function sampler(){
const a=1;
const b =2;
const s=a+b;
return s;
}
app.use(bodyParser.json())
app.get('/',(sampler),(req,res)=>{
res.send(s);
})
app.listen(2300);
What I'm trying to do?
--> Add the variables 'a' and 'b' and send the response to the user.
I know this is pretty beginner stuff, but I couldn't find the answer I'm looking for through Googling. I would appreciate any help on this.