How to check if a number is between two numbers in Node.js

1 Answer

0 votes
const num = 11;

const a = 9;
const b = 42;

if (num > a && num < b) {
  	console.log('yes');
} else {
  	console.log('no');
}



      
      
/*
run:
      
yes
        
*/

 



answered Jun 28, 2022 by avibootz
...