摘要: arr = [0, 2, 4, 6] 1、forEach arr.forEach(item => { console.log(item) }) 数组的每个元素执行函数,没有返回值 2、map let arr2 = arr.map(item => { item * 2 } 生成新数组,新数组由返回值组 阅读全文
posted @ 2018-12-28 00:17 懂生活的程序猿 阅读(161) 评论(0) 推荐(0) 编辑