How generators in javascript help us write more robust and clean code. — With ES6 we have generators, different kind of functions that may be paused at any time, and resumed later, this allows other code to run during those break periods. Let’s review this small code example to better understand how generators work: The first two things you notice is the…