Web前端工程师应该知道的提高JavaScript技能的技巧!答:filter:返回一个数组,只有当指定函数返回true时,相应的元素才会被包含在这个数组中。constarr=[1,2,3,4,5,6];constfiltered=arr.filter(el=>el===2||el===4);console.log(filtered);//[2,4]reduce:按函数中指定的值累加constarr=[1,2,3,4,5,6];constreduced=arr.reduce((total,current)=>total...