1.两个数组,取出不重复的部分 var arr=[1,2,3]; var arr1=[1,2]; vat tmp=[]; for(let i in arr1){ if(!(arr.includes(arr1[i]))){ tmp.push(arr1[i]) } } 2.两个数组对象判重,取出不重复的部分 var arr=[{id:1,name:3},{id:2,name:3},{id:3,name:3}]; var arr1=[{id:1,name:3},{id:2,name:3}]; var…