Javascript Number times(handler)

Description

Javascript Number times(handler)


Number.prototype.times = function(handler) {
  var index = 0;/*from   ww w  . java2s . c o  m*/
  while(index < this) handler(index++);
  return this
};



PreviousNext

Related