between.js is a script that determines if a Number
( or a type that evaluates to Number
) is between two other numbers.
mynum = 4
mynum.between(2, 6) // True
mynum.between(6, 8) // False
mynum.between(4, 8, True) // True
Direct function call:
between(i, l, h, e = false)
Prototype method:
(input).between(i, l, h, e = false)
-
type: Number, Date
Input value.
-
type: Number, Date
Low value.
The lower end of the range to compare against. -
type: Number, Date
High value.
The higher end of the range to compare against. -
type: Boolean
Or equal to.
IfTrue
, the range compared against includesl
andh
.