Waiting for the Database: async, await and try/catch
A database takes a moment to answer, so code that asks it gets a promise instead of the answer, and this lesson shows how await waits for the answer inside an async function, how try and catch handle a database that fails, and what happens when an await is missing.
Updated

- Category
- MongoDB
- Level
- Apprentice
- Tags
- async Function, Asynchronous Code, await, catch Block, JavaScript, Promise, try Block