Promises, Generators, and Other Approaches — We know it most endearingly as “callback hell” or the “pyramid of doom”: doAsync1(function () {
doAsync2(function () {
doAsync3(function () {
doAsync4(function () {
})
})
}) Callback hell is subjective, as heavily nested code can be perfectly fine sometimes. Asynchronous code is hellish when it becomes overly complex…