摘要: 1 map方法 var a = [1,2,3] var b = a.map(v => { if (v 2) { return v; } }) map注意事项 1 map是遍历变量啊,遍历的的结果是得到一个数组,数组中的值是有map中的函数的return值决定的,map的结果与map的数组长度相同; 阅读全文
posted @ 2020-06-09 10:34 Running00 阅读(307) 评论(0) 推荐(0) 编辑