What does a Promise represent in JavaScript?

  • A synchronous operation
  • An asynchronous operation
  • A specific data type
  • A built-in JavaScript function
A Promise in JavaScript represents an asynchronous operation that may or may not be completed at a certain point in time. It's used to handle tasks like fetching data from a server or reading a file, which can take some time to complete. Promises provide a way to work with asynchronous code in a more structured and readable manner.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *