🌍 Public
Viewing a saved revision (read-only)
d46986e403c742208f7a2b603eb5ddfc
Cars Report
This example demonstrates how to assemble a plain-text car report by filtering a static JSON dataset of five vehicles to those priced under $2,000, then formatting each as a line with year, make, model, and price. It uses the native `fetch`-like Promise via `getCars` with a simulated delay, array methods `filter` and `map`, and a custom `formatCar` module. The page renders the result in a `<pre>` element, initially showing "Loading..." until the asynchronous data resolves.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.