// 找出最小值 let arr = [21, 22, 35, 10, 55, 5, 1]; let min = arr[0]; for (let i = 0; i <= arr.length; i++) { min = arr[i] < min ? arr[i] : min } console.log(min)