Promises in ES6
Deepak Grover, Hanu Prateek Kunduru · Apress eBooks · 2017
JavaScript, as we know it, is single threaded by design. In browsers, it uses event handling to manage a lot of tasks concurrently. The JavaScript Engine manages an event queue and when an event occurs, the registered handler function is called. If you have any experience with traditional JavaScript, then you are already well aware of the fact that understanding asynchronous programming is a must to properly be able to use JavaScript. The main pattern for using asynchrony is through the callback function. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.