This is a small vanilla JavaScript app demonstrating core JS concepts from Week 3: variables, functions, DOM manipulation, event handling, and basic form validation. It allows adding, deleting, and marking tasks as complete. Data persists in localStorage.
Features
- Add tasks with simple validation
- Delete tasks
- Mark tasks complete (checkbox)
- Counts for total and completed tasks
- Dark/Light mode toggle (saved to
localStorage)
How to run
- Open
index.htmlin your browser (double-click or open with browser). - Add a task using the input and Add button or press Enter.
- Toggle complete with the checkbox and delete with the Delete button.
- Use the moon/sun button to toggle Dark/Light mode.
Tips for students
- Open Developer Tools (F12) and watch the console for
console.logdebug messages. - Try adding empty tasks to see validation feedback.
- Inspect
localStorageto see saved tasks and theme keys (taskManager.tasks,taskManager.theme).
Next steps / Exercises
- Add edit-in-place for tasks.
- Add task due dates and sorting.
- Add filters (All / Active / Completed).
License
- Free to use for learning and exercises.