Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Set.prototype.isDisjointFrom()

2 tags 1 category

The isDisjointFrom() method of Set instances takes a set and returns a boolean indicating if this set has no elements in common with the given set.

Two sets are disjoint if they have no elements in common. In mathematical notation:

A is disjoint from B⇔A∩B=∅Atext{ is disjoint from }B Leftrightarrow Acap B = empty

!A Venn diagram with two circles. A and B are disjoint because the circles have no region of overlap.

isDisjointFrom() 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: isDisjointFrom(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…