Creates a function that checks if a number x is within the range lowerBound <= x < upperBound.
x
lowerBound <= x < upperBound
The lower bound (inclusive).
The upper bound (exclusive).
A function that takes a number x and returns true if x is in the range, false otherwise.
true
false
const isGrade = Num.isInRange(0, 100);assert.ok(isGrade(50));assert.notOk(isGrade(100)); Copy
const isGrade = Num.isInRange(0, 100);assert.ok(isGrade(50));assert.notOk(isGrade(100));
Creates a function that checks if a number
x
is within the rangelowerBound <= x < upperBound
.