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/08-weakmap-weakset/01-recipients-read/solution.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ messages.shift();
25
25
// now readMessages has 1 element (technically memory may be cleaned later)
26
26
```
27
27
28
-
The `WeakSet` allows to store a set of messages and easily check for the existance of a message in it.
28
+
The `WeakSet` allows to store a set of messages and easily check for the existence of a message in it.
29
29
30
30
It cleans up itself automatically. The tradeoff is that we can't iterate over it, can't get "all read messages" from it directly. But we can do it by iterating over all messages and filtering those that are in the set.
0 commit comments