GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — JavaScript weakMap has() Method - GeeksforGeeks JavaScript weakMap has() MethodLast Updated : 11 Jul, 2025 The Javascript weakMap.has() is an inbuilt function in JavaScript that is used to return a boolean value which indicates whether an element with a particular key is present in the weakmap object or not. Syntax: weakMap.has(key); Parameters: It accepts a parameter 'key' which is the key of the element which is going to be tested for presence in the object weakmap. Return values: It returns true if the element with the specified key is present in the weakmap object otherwise it returns false. Below are examples of weakMap.has() method. Example 1: Below is a basic example of weakmap.has() method that returns true.
Output true Example 2: Here the output is false because the key "key1" has not been set at the end of the weakMap object.
Output false We have a complete list of Javascript WeakMap methods, to check those please go through Javascript WeakMap Complete reference article. Supported Browsers:
Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |