摘要: 转载地址:http://codebay.cn/post/2110.html 1.map 有返回值,返回一个新的数组,每个元素为调用func的结果。 let list = [1, 2, 3, 4, 5]; let other = list.map((d, i) => { return d * 2; }); console.log(other); // print: [2, 4, 6, 8... 阅读全文
posted @ 2017-03-31 09:41 淡墨青云 阅读(299) 评论(0) 推荐(0) 编辑