DevPath · Learn to code ESPTEN

JavaScript

⏳ Asynchrony: promises and async/await

Understand how JavaScript handles tasks that take time, with callbacks, promises and async/await.

What you'll learn

Lessons

The event loop and callbacksHow JavaScript does several things without blocking. PromisesAn object that represents a future result. async / await and Promise.allWrite asynchronous code as if it were synchronous. Microtasks vs macrotasksWhy a .then beats a setTimeout(0). Promise combinatorsall, allSettled, race and any: when to use each one. Asynchronous errorstry/catch with await, .catch() and uncaught rejections.
Practice this module in the app

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →