Chapter practice task
Task: Ship your interactive landing page
- Start from your CSS course landing page.
- Add the dark mode toggle, FAQ accordion and mobile menu.
- Add form validation to the contact section.
- Load one section of live data with fetch.
- Check the console for errors, test on a phone and publish.
By the end of this chapter
- You can read JavaScript errors and find the line that caused them
- You can use breakpoints and the debugger to watch your code run
- You have a finished interactive landing page
Quick answers for this chapter
What’s the most common beginner error?
Trying to use something that’s null or undefined, usually because an element wasn’t found.
Is console.log debugging OK?
Yes, everyone uses it. Breakpoints are just faster for tricky bugs.
Should I remove console.log before launch?
Remove the noisy ones; keep the page’s console clean so real errors stand out.