Cars Report
✓ Published1🌍 Public
This example shows a text-based car report generated from a static JSON dataset, displaying vehicles with prices under $2,000. The page initially shows “Loading…” while `getCars()` simulates a two-second async fetch using a `Promise` and `setTimeout`. After the data loads, `generateReport` filters the parsed JSON array and maps each car through `formatCar`, which uses template literals to produce formatted strings. The final report is inserted into a `<pre>` element via `document.getElementById().textContent`, demonstrating array methods (`filter`, `map`, `join`) with ES6 modules.
AI-generated descriptionAn example tutorial of how to use Javascript arrays and modules.
MIT Licensed