Answers for "early exit js"

0

early exit js

if(page > pages) {
    return res.redirect('?page='+encodeURIComponent(pages)); // <- early exit
} else if(page < 1) {
    return res.redirect('?page='+encodeURIComponent('1')); // <- early exit
}
Posted by: Guest on August-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language