Open this example in the interactive library
Source code
console.log(new Set(["read"]).isDisjointFrom(new Set(["write", "admin"])));
Sample output
true

Check that two sets have no common elements in JavaScript.
Open this example in the interactive library
console.log(new Set(["read"]).isDisjointFrom(new Set(["write", "admin"])));
true