我们有 2 个数组
const arr1 = [{color: 'red', shape: 'square'}, {color: 'blue', shape: 'circle'}, {color: 'green', shape: 'square}]
const arr2 = [{color: 'red', shape: 'circle'}, {color: 'blue', shape: 'circle'}]我想检查 arr2 中的至少一项是否包含在 arr1 中(如果是,则返回 bool 值)。到目前为止,我尝试过arr2.some(item => arr1.includes(item)),但这似乎不起作用。
吃鸡游戏
Smart猫小萌
阿晨1998
守候你守候我
相关分类