①遍历 forEach
②sort排序 取索引
③使用Math.max + apply var max1 = Math.max.call(null,3, 0, -7, 39);
④使用Math.max + 扩展运算符 let max=Math.max(...arr);