Nice - I'd never implemented iterator by hand before. I'd say Object.entries|values|keys is more effective in terms of loc. Is there any reason why you'd use iterator over the Object methods?
This quick article is just to show the source of "TypeError: Found non-callable @@iterator" error and why we can't use for..of loop and spread operator with objects
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice - I'd never implemented iterator by hand before. I'd say
Object.entries|values|keys
is more effective in terms of loc. Is there any reason why you'd use iterator over the Object methods?With .entries you get access to your keys too.
This quick article is just to show the source of "TypeError: Found non-callable @@iterator" error and why we can't use for..of loop and spread operator with objects