Files
developer-roadmap/content/roadmaps/106-javascript/content/114-javascript-iterators-and-generators.md
T
Nisarg-Chokshi 939a0ad80e Adding Arithmetic & Bitwise operators - JS roadmap (#1878)
* Adding Arithmetic & Bitwise operators

* Rectified Typos in the existing files
2022-09-27 15:17:12 +04:00

1.1 KiB

Javascript Iterators and Generators

Iterators and generators, introduced into JavaScript with ECMAScript 6, represent an extremely useful concept related to iteration in the language. Iterators are objects, abiding by the iterator protocol, that allows us to easily iterate over a given sequence in various ways, such as using the for...of loop. Generators, on the other hand, allow us to use functions and the yield keyword to easily define iterable sequences that are iterators as well.

Free Content Introduction to Iterators - Advanced JavaScript A Detailed Discussion on Iterators - Advanced JavaScript What Exactly Are Generators? - Advanced JavaScript