Javatpoint Logo
Javatpoint Logo

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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA