Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Mmp7090
Last edited Feb 7, 2021
Created on Feb 7, 2021
Forked from HTML Starter

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes