What you will use in this project
- Objects and properties
- Arrays: push, length, forEach
- Date handling
- For loops and accumulators
Complete each step in the editor and watch the result as your page takes shape.
Build a tiny expense tracker in the browser.
Filter, sum, and report on an array of expenses.
Medium · +130 XP · JavaScript
Check code when you’re ready. We grade your work against the step’s rubric and tell you exactly what passed and what still needs work.
This project is broken into 7 steps. Each one has its own pass criterion. Click Check code on every step to verify your progress and earn the full +130 XP.
| # | Step & pass criterion | Weight |
|---|---|---|
| 1 | Parse the raw expenses parseExpenses converts date strings to Date objects | 12 pts |
| 2 | Filter expenses by category filterByCategory matches exactly; "all" passes through | 12 pts |
| 3 | Sum the expense amounts total sums amounts; empty array returns 0 | 14 pts |
| 4 | Find the top-spending category topCategory returns the category with the biggest total | 15 pts |
| 5 | Find the most recent expense latestExpense returns the most recent expense object | 15 pts |
| 6 | Total spending by month monthlyTotals returns YYYY-MM totals per month | 16 pts |
| 7 | summary and render summary composes helpers and renders into the page | 16 pts |
Sign in to your W3Schools account to unlock this project, earn XP, and track your progress.
Sign in Create accountNew
Coding fundamentals as a game. Bite-sized lessons and challenges.
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com