Suppose you promise your girlfriend:
“I promise, tomorrow I will meet you in the park at 5 PM.”
At this moment:
You haven’t met yet
You also haven’t cancelled
So what is the situation?
👉 The promise is WAITING
In JavaScript language, we call this state PENDING.
Now… tomorrow comes
Now… tomorrow comes
Only two things can happen. No third option 😄
**
**Case 1: You go to the park
You meet her.
You keep your word.
👉 Promise is RESOLVED
👉 Everything is good 😊
👉 Tum dono happy… aur main bhi 😂😂
Case 2: You don’t go
Maybe you are busy.
Maybe you are sick.
Maybe something went wrong.
👉 Promise is REJECTED
👉 She is angry 😅
👉 Mera kya… main toh coding kar raha tha 😂😂
That’s it. That is a Promise.
JavaScript Promise works exactly the same way.



Top comments (0)