Standard built-ins

Set.prototype.isDisjointFrom()

Try the free JavaScript compiler

Check whether receiver and argument have no common members. Argument may be set-like (size, has, keys); confirm support in the runtime.

Formal Syntax & Structure

javascript syntaxjavascript
set.isDisjointFrom(other)

Parameters & Attributes

NameTypeDescription
otherSet-like objectCollection providing size, has and keys.

Return Value

Boolean

Membership relation result.

Working Example

Example Snippetjavascript
const a=new Set([1,2]);const b=new Set([2,3]);console.log(a.isDisjointFrom(b));
JavaScript Reference