摘要: 1.Array.map() 此方法是将数组中的每个元素调用一个提供的函数,结果作为一个新的数组返回,并没有改变原来的数组 let arr = [1, 2, 3, 4, 5] let newArr = arr.map(x => x*2) //arr= [1, 2, 3, 4, 5] 原数组保持不变 / 阅读全文
posted @ 2020-05-29 18:32 光头小生 阅读(223) 评论(0) 推荐(0) 编辑