摘要: 1 let arr = [1, 2, 3, 4, 5] 2 3 let max = arr.reduce((prev, cur) => { 4 return Math.max(prev, cur) 5 }) 6 7 console.log(max) // expected output: 5 // 阅读全文
posted @ 2023-07-13 13:58 青老师 阅读(11) 评论(0) 推荐(0) 编辑