🌍 Public
Viewing a saved revision (read-only)
dde15bebb4ec4fa18a325bda527d237a
Cars Report
The Cars Report example shows a text-based listing of used cars, filtered to display only vehicles priced below $1,900. It demonstrates asynchronous data loading and JavaScript module composition. The code uses `getCars()` to parse a hardcoded JSON array after a simulated two-second delay, then `generateReport(cars, 1900)` filters and formats each car with `formatCar`. The final report, generated via `Array.filter` and `Array.map`, is displayed in an HTML `<pre>` element. The example relies on Promises and string interpolation rather than charting libraries.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.