Here you can find the source of getMax()
Array.prototype.getMax = function(){ /*from w w w . jav a 2s .c o m*/ var temp = 0; for(var x=1; x<this.length; x++){ if(this[x]>this[temp]){ temp = x; } } return this[temp]; }
Array.prototype.getMAX = function(){ var max = this[0]; for(var i = 1; i < this.length; i++){ if(this[i] > max){ max = this[i]; return max; var array = new Array(); array[0] = 12; array.push(12,34,56,78,21,53,10); document.write(array.getMAX());
Array.prototype.getMax = function() { var max = this[0]; for (var x = 1; x < this.length; x++) { if (this[x] > max) { max = this[x]; return max; }; ...
Array.prototype.getMax = function(){ var arr = this; var maxN = arr[0]; for(var ar in arr){ if(arr[ar] >= maxN){ maxN = arr[ar]; return maxN; ...
Array.prototype.getMax=function(){ var max=0; for(var i=0;i<this.length;i++){ max=this[i]>max?this[i]:max; return max;
var arr = [72, 23,90, 354, 3, 10] Array.prototype.getMaxNumber = function() { var max = this[0] this.map(function(value){ max = Math.max(max, value) }) return max Array.prototype.getMinNumber = function() { ...