摘要: filter是满足条件的留下,是对原数组的过滤; map则是对原数组的加工,映射成一一映射的新数组 简单例子: let arr = [1, 2, 3, 4] let newArr = arr.map(function(item) { // 使用map方法 return item * 2; }); c 阅读全文
posted @ 2017-12-28 20:30 风在吹,雪纷飞 阅读(11333) 评论(0) 推荐(1) 编辑