js 数组合并并去重

let arr = this.defaultToCc.concat(item.copyFor);  //合并数组

let arrNew= new Set(arr); //通过set集合去重

let cc = Array.from(arrNew);
console.log("arrNew",Array.from(arrNew)); //将set集合转化为数
posted @ 2020-04-17 18:02  queqp  阅读(2351)  评论(0编辑  收藏  举报