let arr = [5, 6, 2, 3, 99, 8];
let max = Math.max(...arr);
console.log(max); //99
Math.max 不可以直接传入数组,只可以传入一系列数字
求数组中的最大值
猜你喜欢
转载自blog.csdn.net/qq_43137725/article/details/104068944
今日推荐
周排行