To perform an action once a Promise is settled, regardless of its outcome, you can use the .finally() method, which is called on the ________ of a Promise.
- rejection
- resolution
- completion
- termination
To perform an action once a Promise is settled, regardless of whether it's fulfilled or rejected, you can use the .finally() method. This method is called on the "completion" of a Promise. It's often used for cleanup operations.
Loading...
Related Quiz
- In Node.js, which method is used to establish a connection to a MongoDB database?
- What are the best practices for error handling in a large-scale Node.js application?
- How can middleware be added to an Express application to process requests?
- How can you handle error responses in Express for cleaner error reporting?
- In JavaScript, the import statement cannot be used in ________.