Glossary Term
Set.prototype.isSupersetOf()
The isSupersetOf() method of Set instances takes a set and returns a boolean indicating if all elements of the given set are in this set.
A⊇B⇔∀x∊B,x∊AAsupseteq B Leftrightarrow forall xin B,,xin A
!A Venn diagram with two circles. A is a superset of B because B is completely contained in A.
Note: The superset relationship is not proper superset, which means isSupersetOf() returns true if this and other contain the same elements.
isSupersetOf() accepts set-like objects as the other parameter. It requires this to be an actual Set instance, because it directly retrieves the underlying data stored in this without invoking any user code. Then, its behavior depends on the sizes of this and other:
Syntax example: isSupersetOf(other)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
