← JavaScript Essentials
Modern JavaScript and projects · 15 MIN

Debugging, testing and final project

Debugging, testing and final project

Use browser developer tools to inspect console errors, network requests and DOM state. Write small tests for pure functions and manually test keyboard and touch interactions. Build a task tracker with add, complete, delete and persistent storage features.

Try it yourself

Change the example, run it, and explain the result in your own words. Then create one variation of your own.

Key idea

Use the example as a starting point, not something to memorize. Practise, inspect the result and make small improvements.

Code example

const tasks = [];
function addTask(title) {
  if (!title.trim()) return;
  tasks.push({ id: crypto.randomUUID(), title, done: false });
}
addTask("Practise JavaScript");
console.log(tasks);