By default, JavaScript is a synchronous, single threaded programming language. This means that instructions can only run one after another, and not in parallel. When JavaScript is running asynchronously, the instructions are not necessarily executed one after the other as we saw before. In this article, we will go through callback functions, promises, and async and await.

Table of contents
Synchronous vs AsynchronousWhat are Callbacks in JavaScript?What are Promises in JavaScript?What is Async and Await in JavaScript?To Block Code or Not to Block CodeConclusion13 Comments
Sort: