Or how my code became way easier to read after replacing promises and callbacks with the new async/await features of ES7.
Promises are a great way to perform asynchronous tasks. You describe what you want to happen once the task completes, freeing your app to do other tasks in the meantime.
Here’s an example of a request using promises.
This code is pretty straightforward, but might be confusing to those learning Javascript since execution order isn’t obvious. Between each .then()
…