var arr = [1, 5, 3, 8, 9];
var min =  Math.min.apply(Math, arr);  // 1
var max =  Math.max.apply(Math, arr);  // 9

相关文章: