From 6fc41bac7a66807eeae1d07280079ffde66cc5e6 Mon Sep 17 00:00:00 2001 From: "Violet.Lee" Date: Fri, 30 Aug 2019 05:35:48 +0900 Subject: [PATCH] minor --- 1-js/05-data-types/08-weakmap-weakset/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/08-weakmap-weakset/article.md b/1-js/05-data-types/08-weakmap-weakset/article.md index 7dbe097c..73fcdd66 100644 --- a/1-js/05-data-types/08-weakmap-weakset/article.md +++ b/1-js/05-data-types/08-weakmap-weakset/article.md @@ -155,7 +155,7 @@ We can avoid it by switching to `WeakMap` instead: ```js // 📁 visitsCount.js -let visitsCountMap = new WeakMap(); // map: user => visits count +let visitsCountMap = new WeakMap(); // weakmap: user => visits count // increase the visits count function countUser(user) { @@ -164,7 +164,7 @@ function countUser(user) { } ``` -Now we don't have to clean `visitsCountMap`. After `john` object becomes unreachable by all means except as a key of `WeakMap`, it gets removed from memory, along with the information by that key from `WeakMap`. +Now we don't have to clean `visitsCountMap`. After `john` object becomes unreachable by all means except as a key of `WeakMap`, it gets removed from memory, along with the information by that key from `WeakMap`. ## Use case: caching