How to check if a number is between two numbers in JavaScript

1 Answer

0 votes
const num = 17;

const a = 5;
const b = 91;

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



      
      
/*
run:
      
"yes"
        
*/

 



answered Jun 28, 2022 by avibootz
...