mirror of
https://github.com/bendtherules/blog-hashnode-backup.git
synced 2026-08-18 13:42:04 +00:00
update post: How does in-built Array iterator work?
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
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.
|
||||
|
||||
But do we really know the details of how in-built Array iterator works? Can you write a precise polyfill to implement iterator protocol on Array?
|
||||
But do we know exactly how the in-built Array iterator works? Can you write a precise polyfill to implement iterator protocol on Array?
|
||||
|
||||
## A little about the iterator protocol
|
||||
|
||||
|
||||
Reference in New Issue
Block a user