Determines if a value lies within a specified range (inclusive of the range boundaries).
The value to check.
Optional
The minimum boundary of the range.
The maximum boundary of the range.
true
false
inRange(0, 0, 1);// => true (0 is within the range [0, 1])inRange(1, 0, 1);// => true (1 is within the range [0, 1])inRange(2, 0, 1);// => false (2 is outside the range [0, 1])inRange(-1, 0, 1);// => false (-1 is outside the range [0, 1]) Copy
inRange(0, 0, 1);// => true (0 is within the range [0, 1])inRange(1, 0, 1);// => true (1 is within the range [0, 1])inRange(2, 0, 1);// => false (2 is outside the range [0, 1])inRange(-1, 0, 1);// => false (-1 is outside the range [0, 1])
Determines if a value lies within a specified range (inclusive of the range boundaries).