Write Your Own Node.js Promise Library from Scratch

Promises are the preferred async primitive in JavaScript. Callbacks are becoming increasingly uncommon, especially now that async/await is available in Node.js. Async/await is based on promises, so you need to understand promises to master async/await. In this article, I’ll walk you through writing your own promise library and demonstrate using it with async/await.