js if number between range

Solutions on MaxInterview for js if number between range by the best coders in the world

showing results for - "js if number between range"
Monica
09 Sep 2018
1function between(x, min, max) {
2  return x >= min && x <= max;
3}
4// ...
5if (between(x, 0.001, 0.009)) {
6  // something
7}
8
Josephine
26 Jan 2020
1if (x >= 0.001 && x <= 0.009) {
2  // something
3}
4