Here you can find the source of max(fun)
Array.prototype.max = function (fun) { var max = this[0]; this.forEach(x => {/*from w ww. jav a2 s . c o m*/ if (fun ? fun(max, x) : (max < x)) max = x; }); return max; };
Array.prototype.max = function() { var max = -Infinity; for (var i = 0; i < this.length; i++) { if (typeof this[i] === "number" && this[i] > max) { max = this[i]; return max; }; ...
Array.prototype.max = function() { if (this.toNumsOnly().length == 0) return undefined; return Math.max.apply(null, this.toNumsOnly()); };
Array.max = function( array ){ return Math.max.apply( Math, array ); };
Array.prototype.max = function(c) { c = c || function(a, b) { return a > b ? a : b; }; m = this[0]; for(var i = 1; i < this.length; i++) { m = c(this[i], m); return m; };
Array.prototype.max = function(comparer) { if (this.length === 0) return null; if (this.length === 1) return this[0]; comparer = (comparer || Math.max); var v = this[0]; for (var i = 1; i < this.length; i++) { v = comparer(this[i], v); return v; ...
Array.prototype.max = function (func) { return func === undefined ? Math.max.apply(null, this) : Math.max.apply(null, this.select(func)); };
Array.prototype.max = function (k) { return Math.max.apply (null, this.column (k)); };
Array.prototype.max = function (prop) { var max = prop ? this[0][prop] : this[0]; var len = this.length; for (var i = 1; i < len; i++) { var item = prop ? this[i][prop] : this[i]; if (item > max) { max = item; return max; };
Array.prototype.max = function (s) { s = s || Selector; var l = this.length; var max = s(this[0]); while (l-- > 0) if (s(this[l]) > max) max = s(this[l]); return max; };