Module Recap
Module 06 completed the async/await picture — syntax, error handling, parallel execution, and when to choose async/await over Promise chains.
What you learned
Section titled “What you learned”async functions always return a Promise. Return values are automatically wrapped.
await pauses an async function until the awaited Promise resolves, then provides the value. The browser is not blocked — other code runs while the function is paused.
try/catch/finally in async functions works exactly like synchronous error handling. catch receives the rejection reason. finally always runs.
Promise.all runs multiple async operations in parallel and resolves when all of them succeed. Rejects immediately if any fail.
Promise.allSettled runs all in parallel and resolves when all have settled — fulfilled or rejected. Use for optional operations where partial results are acceptable.
Style choice — async/await for multi-step logic with shared variables and conditionals; Promise chains for linear pipelines of named transforms.
The complete async foundation for BudgetBuddy
Section titled “The complete async foundation for BudgetBuddy”At this point you have all the tools BudgetBuddy needs:
| Tool | Where it is used |
|---|---|
| Array methods (M01) | Filter, sort, and total the expenses array |
| ES6 class (M02) | Expense class with validation and serialization |
| ES modules (M03) | expense.js, storage.js, api.js, ui.js, main.js |
| Destructuring/spread (M04) | Constructor params, immutable updates |
| Fetch/Promises (M05) | Network request structure and error types |
| async/await (M06) | fetchRates, init, event handlers |
What is next
Section titled “What is next”Module 07 is the BudgetBuddy project build — you wire all seven modules together into a complete, working app. Starting from an empty folder, you will build the HTML structure, implement each module file, wire the event handlers, connect the exchange rate API, and end with a deployed, working expense tracker.