Implementing a Custom Promise from Scratch in JavaScript

Promises are one of the most important features of modern JavaScript. We normally use the built-in Promise object for asynchronous operations, but understanding how a Promise works internally gives us a much deeper understanding of asynchronous JavaScript.

In this project, I implemented a simplified custom Promise class from scratch based on the core ideas of the Promises/A+ specification.

The implementation supports:

Promise states