1.筛选出两个数组不同的元素
let list= [];
list = this.array1.filter(item=>{
return array2.indexOf(item) === -1
});
2.筛选出两个数组相同的元素
let list= [];
list = this.array1.filter(item=>{
return array2.indexOf(item) !== -1
});
let list= [];
list = this.array1.filter(item=>{
return array2.indexOf(item) === -1
});
let list= [];
list = this.array1.filter(item=>{
return array2.indexOf(item) !== -1
});