📌  相关文章
📜  如何检查数组中的所有元素是否包含在另一个数组中javascript代码示例

📅  最后修改于: 2022-03-11 15:03:13.784000             🧑  作者: Mango

代码示例5
// how to check all elements in array includes in another array javascript
const includesAll = (arr, values) => values.every(v => arr.includes(v));
includesAll([1, 2, 3, 4], [1, 4]); // true
includesAll([1, 2, 3, 4], [1, 5]); // false