From 2f7806ee12b37587b788d818935712eae596ed13 Mon Sep 17 00:00:00 2001 From: Abhas Bhattacharya Date: Thu, 16 Jul 2020 10:46:13 +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 4ecf475..850db74 100644 --- a/ckciw2lr900d0xas144h5fpwm.md +++ b/ckciw2lr900d0xas144h5fpwm.md @@ -1,6 +1,6 @@ ## How does in-built Array iterator work? -We use `[...someArray]` or `array.values()` to get multiple values out of a array. And we kind of know how it works - it just returns us all the values from the array. Internally, both of them uses the iterator protocol - which is already defined on array prototype. +We use `[...someArray]` or `array.values()` to get multiple values out of a array. And we kind of know how it works - it just returns all the values from the array. Now internally, both of them uses the iterator protocol - which is already defined on array prototype. But do we know exactly how the in-built Array iterator works? Can you write a precise polyfill to implement iterator protocol on Array?