From d144465e97dfedffefccaf59427cc35587585d11 Mon Sep 17 00:00:00 2001 From: Abhas Bhattacharya Date: Sun, 12 Jul 2020 15:19:13 +0530 Subject: [PATCH] update post: How does in-built Array iterator work? --- ckciw2lr900d0xas144h5fpwm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckciw2lr900d0xas144h5fpwm.md b/ckciw2lr900d0xas144h5fpwm.md index c8586b4..2f49048 100644 --- a/ckciw2lr900d0xas144h5fpwm.md +++ b/ckciw2lr900d0xas144h5fpwm.md @@ -76,7 +76,7 @@ Now that we have the in-built array iterator, the most important thing is knowin ## 🤯 Implications -1. `[...arr]` converts sparse array to dense array. (Reason -⭐️ 1️⃣ above) +A. `[...arr]` converts sparse array to dense array. (Reason -⭐️ 1️⃣ above) ```js foo = [10, , 30, 40]; // [10, , 30, 40] @@ -93,7 +93,7 @@ Object.keys(foo) // 0, 2, 3 foo.keys(); // 0, 1, 2, 3 ``` -2. Array iterator will never return more values after it has finished once - even if the array has more values now. (Reason - ⭐️ 2️⃣ above) +B. Array iterator will never return more values after it has finished once - even if the array has more values now. (Reason - ⭐️ 2️⃣ above) ```js arr = [10]