Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based report of used cars, filtering by price and formatting each car as a single line with its year, make, model, and price. The page initially shows “Loading…” and then displays the report after a two-second delay. The code uses JavaScript objects, arrays, and modules, with `getCars` returning a promise that resolves a hardcoded JSON dataset, while `generateReport` filters cars below a price threshold and maps them through `formatCar`. The interface is a single `<pre>` element updated via the DOM API.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed