let arr = [3,2,4,1,8,6]
let maxValue = Math.max.apply(null,arr);
console.log(maxValue);
PS: Math.max()中的參數不可以傳數組
轉載于:https://www.cnblogs.com/manru75/p/10409882.html
let arr = [3,2,4,1,8,6]
let maxValue = Math.max.apply(null,arr);
console.log(maxValue);
PS: Math.max()中的參數不可以傳數組
轉載于:https://www.cnblogs.com/manru75/p/10409882.html