Standard built-ins
WeakSet.prototype.has()
Test membership for a supplied value without exposing other members.
Formal Syntax & Structure
javascript syntaxjavascript
weakSet.has(value)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | Object | nonregistered Symbol | Eligible weak member. |
Return Value
Boolean
Whether the stated condition holds.
Working Example
Example Snippetjavascript
const k={};console.log(new WeakSet([k]).has({}));