intersection(secondSet) { const intersectionSet = new Set() const firstSetValues = this.values() const secondSetValues = secondSet.values() const allValues = [...firstSetValues, ...secondSetValues] allValues.forEach( value => secondSet.has(value) && this.has(value) && intersectionSet.add(value), ) return intersectionSet }