Cars Report
✓ Published0🌍 Public
This example demonstrates a text-based report of cars filtered by price, showing the car year, make, model, and price. It initially displays a "Loading..." message while fetching data asynchronously via a Promise from `getCars`. Once the simulated two-second delay resolves, it generates a filtered list using JavaScript array methods (`filter` and `map`), formats each car with a custom `formatCar` function, and updates the DOM's `textContent` in an HTML `<pre>` element. The report only includes cars under $2,000, selected from a hardcoded JSON array parsed with `JSON.parse`.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed