var arr = [1,2,3,4,5,6] console.log(Math.max.apply(null,arr.join(‘,‘).split(‘,‘))) //6 console.log(Math.min.apply(null,arr.join(‘,‘).split(‘,‘))) //1
取数组最大值和最小值
原文:https://www.cnblogs.com/cai001018/p/14592746.html