Edit Set A and Set B below and watch .union(), .intersection(),
.difference(), and .symmetricDifference() update instantly —
plus the three boolean checks, .isSubsetOf(), .isSupersetOf(),
and .isDisjointFrom().
Type any comma-separated values — numbers or words. Duplicates and blanks are ignored, same as new Set(...).
union merges both, intersection keeps only what's shared,
difference keeps what's in one but not the other, and
symmetricDifference keeps what's in exactly one. None of these mutate A or B —
every line above returns a brand-new Set.
A.isSubsetOf(B) — is every element of A also in B?
—
A.isSupersetOf(B) — does A contain every element of B?
—
A.isDisjointFrom(B) — do A and B share nothing at all?
—
These three always return a plain true or false — never a new Set.