isBetween()

Checks whether range of the given `min` and `max` is between the range of a specified `Range` object

Range.prototype.isBetween()

The isBetween() method checks whether range of the given min and max is between the range of a specified Range object.

range.class.ts
public isBetween(min: number, max: number): boolean {
  return min <= max ? this.hasEvery(min, max) : false;
}

Parameters

min:number

The minimum range of number type to test.

max:number

The maximum range of number type to test.

Return type

Returns

The return value is a boolean type indicating whether the range of a specified Range object is between a range of the given min and max.

Example usage

Last updated