摘要: // 数组中的map 和reduce方法 // map() :接收一个函数,将原数组中的所有元素用这个函数处理后放入新数组中返回 let arr = [1, 2, 3]; // 写法1 箭头函数 arr = arr.map((item) => { return item * 2 }); consol 阅读全文
posted @ 2023-12-14 00:07 逆水涵 阅读(82) 评论(0) 推荐(0)