Javatpoint Logo
Javatpoint Logo

JavaScript WeakSet delete() method

The JavaScript WeakSet delete() method is used to remove the specified object from WeakSet object.

Syntax

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

JavaScript WeakSet delete() method example

Let's see an example to delete the specified elements from the WeakSet object.

Test it Now

Output:

Element present before invoking delete() method: true
Element present after invoking delete() method: false





Please Share

facebook twitter google plus pinterest

B.Tech / MCA


Learn Latest Tutorials