June 2018
Beginner
288 pages
6h 31m
English
JavaScript programs traditionally used callbacks, but that made the code complex and hard to maintain. The promise is an alternative that provides a data channel and an error channel and can be easily composed into a chain of operations. That gives a functional style flavor to code—elegant and easy to work with. The newly introduced async and await builds on promises to bring back familiar imperative code structure while keeping the execution asynchronous.
Here are some exercises for you to practice and improve your understanding of promises. You can find answers to these exerciseshere.
Will Promise.race() wait for at least one of the candidate promises to resolve?
Will Promise.all() wait for all candidate ...
Read now
Unlock full access