Javascript Array min(s)

Description

Javascript Array min(s)


Array.prototype.min = function (s) {
  s = s || Selector;/*w ww .  j ava 2  s  .c  om*/
  var l = this.length;
  var min = s(this[0]);
  while (l-- > 0)
    if (s(this[l]) < min) min = s(this[l]);
  return min;
};



PreviousNext

Related