Skip to content

Commit 567d911

Browse files
committed
Minor clarification on WeakMap and WeakSet
1 parent 2d5be7b commit 567d911

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

1-js/05-data-types/08-weakmap-weakset/article.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ let array = [ john ];
3030
john = null; // overwrite the reference
3131

3232
*!*
33-
// john is stored inside the array, so it won't be garbage-collected
33+
// the object previously referenced by john is stored inside the array
34+
// therefore it won't be garbage-collected
3435
// we can get it as array[0]
3536
*/!*
3637
```

0 commit comments

Comments
 (0)