Javascript Number downto(down, iterator)

Description

Javascript Number downto(down, iterator)

Number.prototype.downto = function (down, iterator) {
  for (var i = this.valueOf(); i >= down; i--) {
    iterator(i);//from   w  w  w . j a v  a 2  s  .  c o  m
  }
  return this.valueOf();
};



PreviousNext

Related