Merge pull request #2231 from Dewke/dewke-minor-fix

Minor clarification on WeakMap and WeakSet
This commit is contained in:
Ilya Kantor 2020-10-29 19:50:30 +03:00 committed by GitHub
commit ca17a69ad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,8 @@ let array = [ john ];
john = null; // overwrite the reference john = null; // overwrite the reference
*!* *!*
// john is stored inside the array, so it won't be garbage-collected // the object previously referenced by john is stored inside the array
// therefore it won't be garbage-collected
// we can get it as array[0] // we can get it as array[0]
*/!* */!*
``` ```