Checks if a number falls within a specified range (inclusive of both minimum and maximum bounds).
Returns true if the value is greater than or equal to the minimum and less than or equal to the maximum.
Useful for range checking, input validation, and boundary testing.

between(5, 0, 10); // true
between(5, 0, 4); // false
  • Parameters

    • value: number

      number to compare

    • min: number

      min value

    • max: number

      max value

    Returns boolean

    true if the number is between the min and the max, false instead