Why is it called a promise?


We are introduced to Promises in this lesson. Why is it called a promise?


A Promise has a similar meaning to what its name implies. It is essentially a guarantee or vow for a function to return a value at some point in the future.

Like a real promise or guarantee you or someone might make, a promise can be in different states. At first, promise is pending and waiting to either be fulfilled or rejected by the one who made it. A promise will then either be fulfilled or rejected, like how someone can either keep their promise or break the promise.