# The JavaScript You Need

The JavaScript You Need: The JavaScript You Need: Variables, Functions and Modules, Waiting for the Database: async, await and try/catch.

Updated: November 19, 2026

1. [The JavaScript You Need: Variables, Functions and Modules](https://www.ask-codey.com/lessons/mongodb-javascript-you-need-functions-and-modules) (Apprentice): The pet adoption API in this module is written in JavaScript, and this lesson teaches the part of it you'll change, starting from the objects you already know from mongosh, then const and let, functions with return and template literals, arrow functions with filter and find, and import and export between files.
2. [Waiting for the Database: async, await and try/catch](https://www.ask-codey.com/lessons/mongodb-javascript-you-need-async-await) (Apprentice): 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.

Source: https://www.ask-codey.com/courses/mongodb-in-depth/topics/mongodb-javascript-you-need
