In JavaScript, a promise is like a promise someone made to bring you something.
It works based on four main steps: creating a promise, waiting for the promise to happen, the promise being fulfilled (meaning they come with the thing you were waiting for), or the promise being broken (meaning they couldn’t come with that thing).
The logic is similar in life. When you make a promise (promise created), the best thing to do is to try your best to keep that promise.
While the person you promised is waiting for you to fulfill it, the best scenario is that you make the promise happen, and everyone is happy. However, life isn’t always perfect.
Sometimes, you make a promise but things go wrong, and you can’t keep it. In such cases, you shouldn’t hide or be shy about saying that you can’t fulfill it. It’s important to return with a message explaining that you tried but couldn’t do it, and that you will try again another time.
General notes:
- It’s okay to make a promise.
- It’s okay if you can’t keep your promise.
- Just let the person you promised know that you can’t achieve what you promised.
- Always try your best to make it happen.