Standard built-ins
Set.prototype.has()
Check membership using SameValueZero without converting value types.
Formal Syntax & Structure
javascript syntaxjavascript
set.has(value)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | Any | Value to associate or insert. |
Return Value
Boolean
Whether the stated condition holds.
Working Example
Example Snippetjavascript
console.log(new Set([NaN]).has(NaN));