I have the following code but cannot think why it is not working.
I want to capture a user's input range. So in this example, if a user enters an input in-between 1 and 2000 it should go to page1 otherwise it should go to page 2.
router.post('example', function (req, res) {
var exchangeYear = req.session.data['exchange-year']
if(exchangeYear > 1) and (exchangeYear < 2000){
res.redirect('page1');
}else{
res.redirect('page2');
}
});