subSet
Checks if the first iterable is a subset of the second one, excluding duplicate values.
- Use the
new Set()constructor to create a newSetobject from each iterable. - Use
Array.prototype.every()andSet.prototype.has()to check that each value in the first iterable is contained in the second one.