Jak napisać zakres liczb w IF Warunki JS

function between(value,first,last) {

 let lower = Math.min(first,last) , upper = Math.max(first,last);
 return value >= lower &&  value <= upper ;

}
dETi