Javascript Number isBetween(a, b)

Description

Javascript Number isBetween(a, b)


Number.prototype.isBetween = function isBetween(a, b) {
 if(a <= this) {
  return this <= b;
 }
 return this >= b;
}



PreviousNext

Related