Javascript Number isBetween(min, max, inclusive)

Description

Javascript Number isBetween(min, max, inclusive)

Number.prototype.isBetween = function (min, max, inclusive) {
  return inclusive
    ? this >= min && this <= max
    : this > min && this < max;
};



PreviousNext

Related