How does the await keyword manage the Promise’s resolve value?

  • It changes the resolve value to a boolean.
  • It extracts the resolve value from the Promise.
  • It modifies the Promise's behavior.
  • It cancels the Promise.
The 'await' keyword is used in async functions to pause the execution until the Promise is resolved. When the Promise resolves, the 'await' expression returns the resolved value. It doesn't change the value to a boolean or modify the Promise itself. This behavior is crucial for handling asynchronous operations more effectively.
Add your answer
Loading...

Leave a comment

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