HTML Cars Report
This example demonstrates how to generate a simple text-based car report by filtering and formatting car data. It shows a list of cars (with year, make, model, and price) that cost under $2,000, displayed as formatted strings in the browser. The code uses JavaScript modules, promises, and asynchronous data loading: `getCars()` simulates a delayed fetch with `setTimeout`, `formatCar` formats each entry, and `generateReport` filters and joins the results. The report updates a DOM element’s text content after the data resolves, with a “Loading…” message shown initially.