const array1 = [1, 2, 3];
const pets = [{value: 1, name: 'aa'},{value: 5, name: 'bb'}];
for(i=0;i<pets.length;i++){
console.log(array1.includes(pets[i].value))
};
includes
最新推荐文章于 2023-02-20 10:12:15 发布
const array1 = [1, 2, 3];
const pets = [{value: 1, name: 'aa'},{value: 5, name: 'bb'}];
for(i=0;i<pets.length;i++){
console.log(array1.includes(pets[i].value))
};