constarr1=['1','2','3','5']constarr2=[{id:'1',},{id:'2',},{id:'3',},{id:'4',}]需求就是arr1跟arr2比较如果arr2得ID等于arr1得话就把等于得arr2放到新数组中如果有不等于的话把arr1不等于arr2得值放到一个新数组中结果就是要相等数组:是arr2id[{id:'1'},{id:'2'},{id:'3'}]不相等数组:是arr1[5]
添加回答
举报
0/150
提交
取消