Last updated 2 years ago
Was this helpful?
JS ⟩ value ⟩ object⟩ built-in ⟩ Set ⟩ extension ⟩ .isEqualTo()
replit ⟩ Set Equality (old code)
// isEqualSets(a,b) function isEqualSets(a, b){ if (a.size !== b.size) return false; return Array.from(a).every(elem => b.has(elem));
👉
array.every(), Array.from()
Set
comparing ECMA6 sets for equality