Javascript Number isDivisibleBy(n)

Description

Javascript Number isDivisibleBy(n)


Number.prototype.isDivisibleBy = function(n){
  if(this % n===0){
    return true;//from w  ww.jav  a 2 s  . c o  m
  }else {
    return false;
  }
};



PreviousNext

Related