JS求数组的最大值和最小值

1. 使用Math.max和Math.min函数配合扩展运算符 (…)

const array = [1, ½, 3, 4.5, -2, 6, -7

你可能感兴趣的:(大前端&移动端全栈架构,javascript,前端,架构)