Fork of Cars Report
✓ Published1🌍 Public
This example demonstrates the interaction between asynchronous data loading and report generation in JavaScript. It shows a simple text-based report of cars under a specified price threshold, displayed in a large font after a two-second loading delay. The code uses the native `Promise` API and `setTimeout` in `getCars.js` to simulate fetching hardcoded JSON data, then the `generateReport` module filters, maps, and joins the array using `Array.filter`, `Array.map`, and `Array.join`. The final output renders in an HTML `<pre>` element via `document.getElementById`, with modules imported and bundled through Rollup.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed