This is your capstone project! Bring together everything from the course — arrays, closures, async, DOM logic, and clean code organization — to build a fully working task manager system.
YOUR TASK
Build a Task Manager where:
Tasks are stored as objects with id, title, status ("pending" or "done"), and priority ("low", "medium", "high")
addTask(title, priority) — adds a new task with a unique id and "pending" status
completeTask(id) — marks the task with that id as "done"
deleteTask(id) — removes the task from the list
getStats() — returns total, done, and pending counts
renderTasks() — prints all tasks in a clean format
Test all operations and print a final stats summary. Keep functions clean and separated.
Need a hint?
Structure to follow:
1. let tasks = []; let nextId = 1;
2. addTask(title, priority): push {'{'} id: nextId++, title, status: "pending", priority {'}'}
3. completeTask(id): find task by id, set status = "done"
4. deleteTask(id): use tasks = tasks.filter(t => t.id !== id)
5. getStats(): count total, done (filter status==="done"), pending
6. renderTasks(): loop and log each task's details
7. Test: add 3 tasks, complete 1, delete 1, print stats
Example output:
[1] Buy groceries — pending (high)
[2] Read a book — done (low)
[3] Go for a run — pending (medium)
---
Total: 3 | Done: 1 | Pending: 2
Code Editor Ready
Output
Console
Console initialized...
Ready for Final Project: Task Manager
> Use "Check My Code" to verify all operations work
> Once it passes, hit Complete Course!