🌍 Public
Viewing a saved revision (read-only)
ade76439dcfe44709753553d05d1b5eb
Cars Report
This example demonstrates a simple text-based report of used car listings, displaying each car’s year, make, model, and price after loading data from a hard-coded JSON string. It shows a loading message while a simulated asynchronous `getCars` function, which returns a Promise with a two-second delay, fetches the data. The report is generated using a `generateReport` module that filters or formats entries, and the page updates dynamically via the DOM API `textContent`. The code uses ES6 modules for `formatCar` and `getCars`, with no external charting libraries.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.