function between(x, min, max) { return x >= min && x <= max; } // ... if (between(x, 0.001, 0.009)) { // something }
if (x >= 0.001 && x <= 0.009) { // something }