Fork of Cars Report
✓ Published1🌍 Public
This example shows a text-based car report that filters a static JSON dataset of five used cars to display only those priced under $2,000. The interface initially shows a loading message before a two-second delay simulates an asynchronous fetch using `getCars()`, which returns a promise. The `generateReport` function uses JavaScript’s `filter` and `map` methods to format each qualifying car into a single line using the `formatCar` module. Output is rendered directly into an HTML `<pre>` element via `document.getElementById`.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed