One of the most revolutionary things in ES6 (EcmaScript 2015) is the introduction of generator functions. These are special functions that may be paused at any time as they wait for an async operation to complete by utilizing the yield expression, and are resumed as soon as that operation completes.
Full article