Array Maximum and Minimum Values - JavaScript Tutorials and Scripts
Extracting the maximum or minimum value from an array. ... Array.prototype.max = function() {var max = this[0]; var len = this.length; for (var i = 1; i < len; i++) if (this[i] > max) max = this[i];...