Standard built-ins
Set.prototype.isSupersetOf()
Check whether every argument member occurs in the receiver. Argument may be set-like (size, has, keys); confirm support in the runtime.
Formal Syntax & Structure
javascript syntaxjavascript
set.isSupersetOf(other)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| other | Set-like object | Collection 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.isSupersetOf(b));