Nodejs Utililty Methods Array Min

List of utility methods to do Array Min

Description

The list of methods to do Array Min are organized into topic(s).

Method

min(s)
Array.prototype.min = function (s) {
  s = s || Selector;
  var l = this.length;
  var min = s(this[0]);
  while (l-- > 0)
    if (s(this[l]) < min) min = s(this[l]);
  return min;
};
minimum()
Array.prototype.minimum = function () {
  return this.reduce(function (min, aValue) {
    return Math.min(min, aValue);
  }, this[0]);
};
minimum()
Array.prototype.minimum = function()
    var min = this[0];
    for(el in this)
        if(this[el] < min)
            min = this[el] ;
    return min;
};