JavaScript Set isSupersetOf()
Example
const A = new Set(['a','b','c']);
const B = new Set(['b','c','d']);
let answer = A.isSupersetOf(B);
Try it Yourself »
Description
The isSupersetOf() method returns
true if all elements in the argument set are also in this set:

Syntax
isSupersetOf(set)
Parameters
| Parameter | Description |
| set | Required. The set to test against. |
Return Value
| Type | Description |
| Boolean | true if all elements in the argument set are also in this set,
otherwise false. |
Set Logic Metods:
See Also:
Browser Support
The isSupersetOf() method is supported in all modern browsers since June 2024:
| Chrome 122 | Edge 122 | Firefox 127 | Safari 17 | Opera 108 |
| Feb 2024 | Feb 2024 | Jun 2024 | Sep 2023 | Mar 2024 |