求数组最大值,最小值

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

猜你喜欢

转载自www.cnblogs.com/AnnieShen/p/9253638.html