WeakMap.prototype.delete()
WeakMap.prototype.delete() is a JavaScript method in the WeakRef category. Removes a key. The syntax is wm.delete(key). A typical example: wm.delete(obj). A close sibling is WeakRef(), which creates a weak reference. A close sibling is WeakRef.prototype.deref(), which returns the referenced object or undefined. A close sibling is WeakSet.prototype.has(), which checks for object. A close sibling is WeakSet.prototype.delete(), which removes an object. More about this category: WeakRef and FinalizationRegistry. Related WeakRef methods: WeakRef(), WeakRef.prototype.deref(), WeakSet.prototype.has(), WeakSet.prototype.delete(), WeakMap.prototype.has(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try WeakMap.prototype.delete() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.