Javascript Generators – THEY CHANGE EVERYTHING – ES6 Generators Harmony Generators
Javascript Generators are AWESOME. At first glance, they seem overly simple and not very useful, but with a little bit of library love, they turn your async javascript from awful to joyful.
View the code here: https://gist.github.com/learncodeacademy/bf04432597334190bef4
If you don’t know promises, watch this video: http://www.youtube.com/watch?v=obaSQBBWZLk&list=UUVTlvUkGslCV_h-nSAId8Sw
Basically, ES6 generators give you the ability to write async code as if it were synchronous code. It literally looks like you’re not even writing async code! Harmony generators are definitely, without a doubt, the most powerful upgrade that javascript is receiving with ES6 harmony.
source