判断数组array1是否包含array2
private arr1IncludesArr2() {let array1 = [1, 2, 3, 4, 5];let array2 = [1, 2, 3, 4, 5, 6, 7];return array2 .every((el) => array1 .includes(el)); // 完全包含return true, 否则返回false}
时间:2021-09-09 10:52:04
判断数组array1是否包含array2
private arr1IncludesArr2() {let array1 = [1, 2, 3, 4, 5];let array2 = [1, 2, 3, 4, 5, 6, 7];return array2 .every((el) => array1 .includes(el)); // 完全包含return true, 否则返回false}
高三毕业生的 heartfelt 感悟与寄语:20篇精选100字感言
2024-09-05