const arr = [1,2,3,4,5,6]
//const max =  Math.max(...arr) //可以用扩展运算符,也可以利用apply的特性
const max = Math.max.apply(null, arr)//Math.min  最小值
console.log(max) 

 

相关文章:

  • 2021-09-19
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2021-09-19
  • 2021-07-24
  • 2022-12-23
相关资源
相似解决方案