menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Today lear...
source image

Dev

11h

read

337

img
dot

Image Credit: Dev

Today learned about promise in javascript.

  • In JavaScript, a Promise is an object handling the completion or failure of asynchronous operations and their resulting values.
  • Promises provide a structured way to manage asynchronous code, improving readability and maintainability compared to traditional callback-based methods.
  • A Promise can be in three states: Pending (initial state), Fulfilled (operation successful), and Rejected (operation failed).
  • To create a Promise, use the Promise constructor with an executor function that includes resolve (successful completion) and reject (failure) methods.

Read Full Article

like

20 Likes

For uninterrupted reading, download the app