🌍 Public
Viewing a saved revision (read-only)
6927793ff2214a409d6a5d3128846231
Cars Report
This example demonstrates a simple text-based report generated from an array of car objects. It shows how asynchronous data loading and modular JavaScript can dynamically populate a web page. The code uses the `fetch`-like pattern via a custom Promise in `getCars.js`, along with `JSON.parse` to convert raw data. The `generateReport` function filters cars by price and formats each entry using `formatCar` template literals. The page displays “Loading…” initially, then updates the DOM's `textContent` with the filtered list after a simulated two-second delay.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.