The Promise constructor accepts a function (an executor) that will be executed immediately and two functions: resolve and reject, which must be called when the Promise is resolved (passing a result) (passing an error).
Object literal syntax is the most popular method: color: 'blue,' type:'sedan,' doors: '4', const myCar = You could also construct a class and use the new keyword to instantiate it. A promise, like the later example, is simply an object that we construct.
The initial state is pending:
fulfilled: signifies that the operation promised was completed successfully.
rejected: denotes that the promised operation did not go as planned.
Superb and amazing 😍🤩 enjoyable experience.
This is by far the most comprehensive tutorial I ever come across. I was really excited to discover this amazing tutorial, but unfortunately couldn't continue due to keypad noise which I'm allergic to
VAISHNAVI RAJESH CHALKE
it helps me to clear my basic conceptual knowledge
Thank you! I enjoyed the course; I learned so much.
Share a personalized message with your friends.