判断数组是否相同
// 判断数组是否相同(只判断元素,不判断顺序)
export function arrayCompare(arr1, arr2) {
let result = arr1.length === arr2.length && arr1.every(a => arr2.some(b => a === b)) && arr2.every(_b => arr1.some(_a => _a === _b))
return result
}
// 判断数组是否相同(只判断元素,不判断顺序)
export function arrayCompare(arr1, arr2) {
let result = arr1.length === arr2.length && arr1.every(a => arr2.some(b => a === b)) && arr2.every(_b => arr1.some(_a => _a === _b))
return result
}