Nodejs Array Skip skipWhile(predicate)

Here you can find the source of skipWhile(predicate)

Method Source Code

Array.prototype.skipWhile = function (predicate) {
   predicate = predicate || Predicate;//from   w w  w. j  a  v a  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);
};

Related

  1. skip(count)
    Array.prototype.skip = function (count) {
        return this.slice(count);
    };
    
  2. skip(skipNumber)
    Array.prototype.skip = function(skipNumber){
       return this.slice(skipNumber);
    };
    
  3. skipUntil(fun)
    Array.prototype.skipUntil = function (fun) {
        var result = new Array(), index = 0;
        while (!fun(this[index])) {
            index++;
        return this.skip(index);
    };
    
  4. skipWhile(fun)
    Array.prototype.skipWhile = function (fun) {
        var result = new Array(), index = 0;
        while (fun(this[index])) {
            index++;
        return this.skip(index);
    };