Javascript Array skipWhile(predicate)

Description

Javascript Array skipWhile(predicate)


Array.prototype.skipWhile = function (predicate) {
  predicate = predicate || Predicate;/*from w w w . j ava  2  s.  c  o  m*/
  var l = this.length;
  var i = 0;
  for (i = 0; i < l; i++)
    if (predicate(this[i], i) === false) break;

  return this.skip(i);
};



PreviousNext

Related