Skip to content

Commit 394bb6c

Browse files
committedOct 21, 2019
Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info into sync-30e3fa72
2 parents 785bbc1 + 30e3fa7 commit 394bb6c

File tree

41 files changed

+169
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+169
-112
lines changed
 

Diff for: ‎1-js/05-data-types/08-weakmap-weakset/01-recipients-read/solution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Let's store read messages in `WeakSet`:
22

3-
```js
3+
```js run
44
let messages = [
55
{text: "Hello", from: "John"},
66
{text: "How goes?", from: "John"},

Diff for: ‎1-js/05-data-types/08-weakmap-weakset/01-recipients-read/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let messages = [
1616

1717
Your code can access it, but the messages are managed by someone else's code. New messages are added, old ones are removed regularly by that code, and you don't know the exact moments when it happens.
1818

19-
Now, which data structure you could use to store information whether the message "have been read"? The structure must be well-suited to give the answer "was it read?" for the given message object.
19+
Now, which data structure could you use to store information about whether the message "has been read"? The structure must be well-suited to give the answer "was it read?" for the given message object.
2020

2121
P.S. When a message is removed from `messages`, it should disappear from your structure as well.
2222

0 commit comments

Comments
 (0)