// return true if in range, otherwise false
functionin Range(x, min, max) {
return((x-min)*(x-max) <=0);
}
console.log(inRange(5,1,10));// true
console.log(inRange(-5,1,10));// false
console.log(inRange(20,1,10));// false
// return true if in range, otherwise false
functionin Range(x, min, max) {
return((x-min)*(x-max) <=0);
}
console.log(inRange(5,1,10));// true
console.log(inRange(-5,1,10));// false
console.log(inRange(20,1,10));// false