Set methods
Newly available since 2024-06-11
The difference()
, intersection()
, isDisjointFrom()
, isSubsetOf()
, isSupersetOf()
, symmetricDifference()
, and union()
methods of the JavaScript Set
object performs operations between two sets.
Learning resources on MDN
- Set.prototype.difference()
- Set.prototype.intersection()
- Set.prototype.isDisjointFrom()
- Set.prototype.isSubsetOf()
- Set.prototype.isSupersetOf()
- Set.prototype.symmetricDifference()
- Set.prototype.union()
Browser support
- Chrome 122 Released on 2024-02-20
- Chrome Android 122 Released on 2024-02-20
- Edge 122 Released on 2024-02-23
- Firefox 127 Released on 2024-06-11
- Firefox for Android 127 Released on 2024-06-11
- Safari 17 Released on 2023-09-18
- Safari on iOS 17 Released on 2023-09-18
Specifications
- Set methods, from TC39 (Ecma International).