1. 程式人生 > >求數組最大值,最小值

求數組最大值,最小值

color min cal bsp this max AS IV 最大

Math.max.apply(this,[120,129,56,34,98])  //129
Math.max.call(this,120,129,56,34,98)  //129
Math.min.apply(this,[120,129,56,34,98])  //34
Math.min.call(this,120,129,56,34,98)  //34

求數組最大值,最小值