摘要: map()和filter()函数 js的数组迭代器函数map和filter,可以遍历数组时产生新的数组,和python的map函数很类似1)filter是满足条件的留下,是对原数组的过滤(筛选);2)map则是对原数组的加工,映射成一一映射的新数组(形成新数组) 例如:var arr=[1,2,3, 阅读全文
posted @ 2016-04-07 17:42 wxw婉 阅读(385) 评论(0) 推荐(0)