Math.max和Math.min都是针对数值的,例如Math.max(2,4) 由于apply的入参是数组,所以可以巧妙的实现数组求最大最小值,实现如下 Math.max.apply(Math, [1,2,3])