ES6数组去重及ES5数组去重方法

参考地址:http://www.cnblogs.com/thinkingthigh/p/9711736.htmlhtml 去重web // ES6:使用Set 对象 let array = [1, 1, 1, 1, 2, 3, 4, 4, 5, 3]; let set = new Set(array); console.log(set); // ES5: 使用forEach 遍历, i
相关文章
相关标签/搜索