In Node.js, what is the primary purpose of a
try/catch block?- aTo register a callback that runs after all pending I/O operations finish
- bTo automatically retry a failed function call up to three times
- cTo catch and handle errors thrown synchronously inside the try block✓
- dTo pause execution until a Promise settles, without using
await
Explanation:try/catch catches exceptions thrown synchronously during the execution of the code inside the try block, letting you handle them in the catch block instead of letting them propagate and crash the program. It has no special retry or I/O-scheduling behavior.