Javascript Array some(iterator)

Description

Javascript Array some(iterator)


Array.prototype.some = function(iterator) {
  for (var i = 0, len = this.length; i < len; i++) {
    if (iterator(this[i], i)) {
      return true;
    }//  w  ww.  ja v a2  s . com
  }
  
  return false;
};



PreviousNext

Related