JS ⟩ value ⟩ object⟩ built-in ⟩ Set ⟩ extension ⟩ .isEqualTo()
// isEqualSets(a,b)
function isEqualSets(a, b){
if (a.size !== b.size) return false;
return Array.from(a).every(elem => b.has(elem));
}
// setA.equal(setB)
Set.prototype.equal = function(setB){
return isEqualSets(this, setB);
}