WeakMap has() JavaScript JS

The JavaScript WeakMap has() method to find out if the WeakMap object contains the specified value element. Syntax: WeakMapObj.has(key) Parameters: key: It represents the key to be found in the WeakMap object. Returns: It returns true if the given key is present in the WeakMap, otherwise returns false. Example 1: <!DOCTYPE html> <html> <body> <script> … Read more