In this chapter, we will be learning all about the newly introduced iterators and generators, which bring simplicity and customizability to the traversing mechanism in JavaScript. A lot of programming languages have already moved away from the boring old for loops that required additional efforts to keep track of the current index position while traversing through the items in the collection. Let’s take a look at how we can use iterators and generators to efficiently process data in our applications. ...
© Deepak Grover and Hanu Kunduru 2017
Deepak Grover and Hanu Prateek Kunduru, ES6 for Humans, https://doi.org/10.1007/978-1-4842-2623-0_8
8. Iterators and Generators
Deepak Grover1 and Hanu Prateek Kunduru2
(1)Delhi, India
(2)Seattle, Washington, USA
Get ES6 for Humans: The Latest Standard of JavaScript: ES2015 and Beyond now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.