获取数组中的最大、最小值

var arr = [1, 5, 3, 8, 9];
var min =  Math.min.apply(Math, arr);  // 1
var max =  Math.max.apply(Math, arr);  // 9
原文地址:https://www.cnblogs.com/Zting00/p/7497648.html