// 获取数组中最大值
var arr = [134798, 3478973, 12, 345, 355, 425, 1342356, 3425566, 7908798]
var max = arr.reduce(function (prev, next) {
return Math.max(prev, next) // Math.min(prev, next)
}, 0)
console.log(max)
原文:https://www.cnblogs.com/zhuhukang/p/15259317.html