DEV Community

loading...

Discussion on: Understanding JavaScript async/await in 7 seconds

Collapse
bradtaniguchi profile image
Brad

Callback hell -> promise chaining -> async await (in an IIFE)

Next step is understanding Observables in 10 seconds (which isn't possible unfortunately 😢 )

But all kidding aside nice callback to an older twitter post ;D

Collapse
wassimchegham profile image
Wassim Chegham Author

Thank you. A tweet worths thousand words, right? _^

Collapse
wolfhoundjesse profile image
Jesse M. Holmes
getData(a).pipe(
  concatMap(b => getMoreData(b)),
  concatMap(c => getMoreData(c)),
  concatMap(d => getMoreData(d)),
  concatMap(e => getMoreData(e))
).subscribe({ next: e => console.log(e)})