🌍 Public
Viewing a saved revision (read-only)
969c22c316c24fa5aa19aef1029a952e
Cars Report
This example displays a filtered list of used cars with prices under $2,000, loading after a two-second delay. It shows how to structure data with JavaScript objects and arrays, using the `JSON.parse` method to interpret inline JSON data. The code demonstrates asynchronous data retrieval with a `Promise` returned by `getCars`, and formatting logic via the exported `formatCar` function. The report is generated by chaining `filter`, `map`, and `join` methods in `generateReport`, with the output rendered as text content into the page’s `pre` element.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.