Hold Up — What Are JavaScript Generators?

Cover photo by Chris Dickens / Unsplash

We learned JavaScript knowing that functions execute from top-to-bottom, just like we read English from right-to-left. That all changed when ES6 was released in June of 2016, bringing with it the ability to pause functions in the middle of execution.

How does this work? Generators! Also known as Generator Functions.