When handling errors in an async function, if an error is not caught within the function, it will cause the returned Promise to be in a ________ state.
- Pending
- Fulfilled
- Rejected
- Completed
When an uncaught error occurs in an async function, the returned Promise will be in a "Rejected" state. In the Promise lifecycle, it can start as "Pending," move to "Fulfilled" upon success, or "Rejected" upon an error.
Loading...
Related Quiz
- The fs.createReadStream method is particularly useful when dealing with ______ sized files.
- Which of the following is used to consume a Promise?
- Which of the following is the primary goal of input sanitization?
- When a Promise is pending and neither fulfilled nor rejected, it is in the ________ state.
- When a JavaScript function is executed, a new execution context is created, and a special object called ________ is created.