Generators in ES6 are a special kind of function that return an iterator. They are quite a bit different than your standard run of the mill function in JavaScript however. Generators can pause themselves as they are running, and return multiple values as execution pauses and resumes. You use an iterator to call a generator multiple times. Let’s look at some examples to better understand how generators work.