JS 快速获取数据中的最大、最小值

2024-10-14 03:07:54

1、var numbers = [5, 458 , 120 , -215 , 228 , 400 , 122205, -85411];var maxInNumbers = Math.max.apply(Math, numbers);var minInNumbers = Math.min.apply(Math, numbers);

猜你喜欢