Parameters: Here parameter “object” is an iterable object. All the elements of the iterable object are added to the WeakSet.
Some different WeakSet functions:
|add(value)||a new object is appended with the given value to the weakset.
|delete(value)||Deletes the value from the WeakSet collection.
|has(value)||Returns true if the value is present in the WeakSet Collection, false otherwise.
|length()||Returns the length of weakSetObject
objectOne added objectTwo added WeakSet has objectTwo : true objectTwo deleted WeakSet has objectTwo : false