Chaining Promises
.then
callbacks can be synchronous or return another Promise- If the
.then
callback returns a Promise, the next.then
will wait until the returned promise finishes - This collapsing helps make asynchronous code much easier to follow
- You don't need nested callbacks. Can orchestrate everything in one place
4 / 23