Javascript: Promises

A promise is one of these states:
1- Pending : Initial state, neither fulfilled nor rejected
2- fulfilled: Request is completed
3- Rejected: Request is rejected

In javascript we use below ways to handle promises:
1- using then() function
2- Using async and await (easy and best)

Curtesy: LetCode youtube Chanel

Leave a Reply