From 7797cbdccd5106be92e5bc2aee2b8ecd64e0e845 Mon Sep 17 00:00:00 2001 From: Abhas Bhattacharya Date: Thu, 16 Jul 2020 10:20:05 +0530 Subject: [PATCH] update post: How does in-built Array iterator work? --- ckciw2lr900d0xas144h5fpwm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckciw2lr900d0xas144h5fpwm.md b/ckciw2lr900d0xas144h5fpwm.md index 0ee2a25..35fb1c6 100644 --- a/ckciw2lr900d0xas144h5fpwm.md +++ b/ckciw2lr900d0xas144h5fpwm.md @@ -13,7 +13,7 @@ When we use spread operator, like `[...someArray]` - it treats someArray as a ge 2. Then it consumes all the values from the iterable by calling `iter.next()` repeatedly. This method `.next()` returns response in this structure `{value: "something", done: true|false}`. -3. While values are available, it returns `done: true`; after all values are finished, it returns `done: false`. After this, the consumer (i.e. spread operator) should stop asking for more values. +3. While values are available, it returns `done: false`; after all values are finished, it returns `done: true`. After this, the consumer (i.e. spread operator) should stop asking for more values. This is how the iterable/iterator stuff works.