If in between two numbers - Node.js Number

Node.js examples for Number:Compare

Description

If in between two numbers

Demo Code

Array.prototype.inBetween = function(num){
  if(num >= this[0] && num <= this[1]){
    return true;/*from w  w  w  .j a va 2 s.  co  m*/
  }
  return false;
}

Related Tutorials