const a = [1, 2, 3, 4, 5, 6];
const max = Math.max(...a);
console.log(max); // 6
ES6获取数组最大值
猜你喜欢
转载自blog.csdn.net/weixin_43757001/article/details/108601163
今日推荐
周排行