Javascript Array contains(o, comparer)

Description

Javascript Array contains(o, comparer)


Array.prototype.contains = function (o, comparer) {
  comparer = comparer || EqualityComparer;
  var l = this.length;
  while (l-- > 0)
    if (comparer(this[l], o) === true) return true;
  return false;//from ww w.  ja  v  a 2  s  . c  o  m
};



PreviousNext

Related