Home » JavaScript WeakSet has() Method

JavaScript WeakSet has() Method

by Online Tutorials Library

JavaScript WeakSet has() method

The JavaScript WeakSet has() method indicates whether the WeakSet object contains the specified object. It returns true if the specified object is present, otherwise false.

Syntax

The has() method is represented by the following syntax:

Parameter

value – It represents the object to be searched.

Return

A Boolean value.

JavaScript WeakSet has() method example

Let’s see an example to determine whether the WeakSet object contains the specified object.

Test it Now

Output:

true  false  false  

Next TopicWeakSet Method

You may also like