使用reduce给数组对象去重_reduce数组对象去重_laishaojiang的博客-CSDN博客普通的数组去重,有很多方法,比如快捷的方法比如es6是Set,Map等,但是对于数组对象,这些方法都不适用,传统的forEach,filter等又有点繁琐。 这里介绍一个新方法——reduce()先看一次下语法介绍array.reduce(function(previousValue , currentValue, index, array ), initialValue)..._reduce数组对象去重https://blog.csdn.net/laishaojiang/article/details/102819920