What is a Promise

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 222:- What is a Promise

A promise is an object representing the eventual completion or failure of an asynchronous operation. It allows you to write asynchronous code that behaves more like synchronous code, making it easier to understand and maintain.

A promise can have three states:

  1. Pending: The initial state, neither fulfilled nor rejected.
  2. Fulfilled: The operation completed successfully, and the promise has a resulting value.
  3. Rejected: The operation failed, and the promise has a reason for the failure.

Promises simplify the chaining of asynchronous operations. They allow you to avoid deeply nested callbacks, known as callback hell. Instead of relying on callbacks to handle the results of asynchronous operations, promises provide a more straightforward way to handle the eventual outcome of those operations.

26. Promises

2 Comments

@niteshguptav63
niteshguptav63 Nov 17, 2024 at 1:39 PM

I am not able to access videos from second class and further. I have already completed first class

@niteshguptav63
niteshguptav63 Nov 16, 2024 at 10:56 AM

When will I get my course?

@admin79
admin79 Nov 17, 2024 at 1:29 PM

Now, Your query was resolved.

Frequently Asked Questions About Sciaku Courses & Services

Quick answers to common questions about our courses, quizzes, and learning platform

Didn't find what you're looking for?

help_center Contact Support