delete() method removes the specified element from a
The key of the element to remove from the
true if an element in the
WeakMap object has been removed
false if the key is not found in the
if the key is not an object.
const wm = new WeakMap(); wm.set(window, "foo"); wm.delete(window); // Returns true. Successfully removed. wm.has(window); // Returns false. The window object is no longer in the WeakMap.
|ECMAScript Language Specification |
BCD tables only load in the browser