Skip to main content
Version: 3.28.0

Set.prototype.has()

The has() method returns a boolean indicating whether an element with the specified value exists in a Set object or not.

Syntax

has(value)

Parameters

  • value
    • : The value to test for presence in the Set object.

Return value

Returns true if an element with the specified value exists in the Set object; otherwise false.