返回数组中的最大值。
将Math.max()与扩展运算符 (...) 结合使用以获取数组中的最大值。
Math.max()
...
const arrayMax = arr => Math.max(...arr); // arrayMax([10, 1, 5]) -> 10
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8