You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/05-data-types/07-map-set-weakmap-weakset/article.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -328,7 +328,7 @@ Compare it with the regular `Map` example above. Now if `john` only exists as th
328
328
329
329
- `weakMap.get(key)`
330
330
- `weakMap.set(key, value)`
331
-
- `weakMap.delete(key, value)`
331
+
- `weakMap.delete(key)`
332
332
- `weakMap.has(key)`
333
333
334
334
Why such a limitation? That's for technical reasons. If an object has lost all other references (like `john` in the code above), then it is to be garbage-collected automatically. But technically it's not exactly specified *when the cleanup happens*.
0 commit comments