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

2026-02-13 18:45:28

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);

猜你喜欢