vararr= [12,12,45,78,1,3,8,8,12,454,9,16,16,30,"string","numder"];
Array.prototype.max=function(){//数组最大值
varm=this[0];
for(vari=0;i
if(m
m=this[i];
}
}
returnm;
}
alert(arr.max());
vararr= [12,12,45,78,1,3,8,8,12,454,9,16,16,30,"string","numder"];
Array.prototype.max=function(){//数组最大值
varm=this[0];
for(vari=0;i
if(m
m=this[i];
}
}
returnm;
}
alert(arr.max());