April 2018
Beginner
536 pages
13h 21m
English
After seeing how the use of callbacks can lead to some maintainability problems, we are now going to learn about promises and how they can be used to write better asynchronous code. The core idea behind promises is that a promise represents the result of an asynchronous operation. A promise must be in one of the following three states:
Once a promise is fulfilled or rejected, its state can never change again. Let's look at the basic syntax of a promise:
function ...