Javascript Number times(blk)

Description

Javascript Number times(blk)


Number.prototype.times = function(blk){
  for (var i = 0 ; i < this ; ++i){
    blk.apply(i, [i]);/* ww w  .  j  av  a 2  s .c o m*/
  }
  return this;
}



PreviousNext

Related