let data = [1, 10, 4, 12, 22, 0, 48, 33]
console.log(Math.min(...data)) // 0
console.log(Math.max(...data)) // 48
获取最大值最小值
最新推荐文章于 2024-04-24 10:17:40 发布
let data = [1, 10, 4, 12, 22, 0, 48, 33]
console.log(Math.min(...data)) // 0
console.log(Math.max(...data)) // 48