📅  最后修改于: 2022-03-11 14:58:34.283000             🧑  作者: Mango
function sameMembers(arr1, arr2) {
const set1 = new Set(arr1);
const set2 = new Set(arr2);
return arr1.every(item => set2.has(item)) &&
arr2.every(item => set1.has(item))
}