当前位置:网站首页>JS get the maximum value in the array

JS get the maximum value in the array

2022-06-10 14:39:00 ζ He Yiyi

js Gets the maximum value in the array

Method 1

Math.max.apply(Math, [1,2,3,4,5]); //5

Method 2

Math.max(...[1,5,9,10,1]) //10
原网站

版权声明
本文为[ζ He Yiyi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101434186660.html