js中如何判断一个数组是另一个数组的子集
handleIncludes(childArr, fatherArr) { return childArr.every(v => fatherArr.includes(v)); }, let arr = [1,2] let brr = [1,2,3] let target = this.handleIncludes(arr, brr); // true
handleIncludes(childArr, fatherArr) { return childArr.every(v => fatherArr.includes(v)); }, let arr = [1,2] let brr = [1,2,3] let target = this.handleIncludes(arr, brr); // true