Home » JavaScript WeakSet delete() Method

JavaScript WeakSet delete() Method

by Online Tutorials Library

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  

You may also like