Chapter 6 — DOM Manipulation
New concepts: getElementById, createElement, innerHTML, classList, addEventListener
Open the browser Console (F12 → Console) to see output from console.log().
Exercises
- Create a table from the sales data array and append to #output
- Add a filter button: click → show only Delivered orders in the table
- Add a sort button: click → re-sort table by total descending
- Colour rows by status: green=Delivered, yellow=Shipped, blue=Pending, red=Cancelled