🌍 Public
Viewing a saved revision (read-only)
ad4b799217694f97b85e841b97516fcf
Cars Report
This example demonstrates a simple text-based report of used cars, displaying each vehicle’s year, make, model, and price. It first shows a "Loading..." message while data is fetched asynchronously, then lists cars under a specified price threshold. The code uses JavaScript modules, promises with `setTimeout`, and array methods like `filter` and `map` to transform JSON data. Formatting is handled by a custom `formatCar` function, with output rendered into an HTML `<pre>` element.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.