Answers for "js if number between range"

1

js if number between range

function between(x, min, max) {
  return x >= min && x <= max;
}
// ...
if (between(x, 0.001, 0.009)) {
  // something
}
Posted by: Guest on May-08-2021
0

js if number between range

if (x >= 0.001 && x <= 0.009) {
  // something
}
Posted by: Guest on May-08-2021

Code answers related to "js if number between range"

Code answers related to "Javascript"

Browse Popular Code Answers by Language