The 4 levels of clean JS ASync programming: Javascript programming can get really ugly, really fast...but not if you know how to avoid "callback hell".
Code available here: http://plnkr.co/edit/1ArvFxI0gWmajTpDaOSB?p=preview
Also watch this video - ES6 Generators
https://www.youtube.com/watch?v=QO07THdLWQo
Level one: Programming with callbacks - you make it work, but it's ugly
Level two: Programming with abstracted callbacks - cleaner for sure, but still messy and way too much repeated cod
آی-ویدئو