Parameters: It accepts the parameter “A” which is a value going to be checked whether it is present in the weakSet object or not.
Return Values: It returns boolean value true if the element is present otherwise it returns false.
Here output is true because the object “object1” is present in the WeakSet() object.
Here output is false because the object “object1” is not present in the WeakSet() object.
This article is attributed to GeeksforGeeks.org