🌍 Public
Viewing a saved revision (read-only)
7da61b67622a4970a54546af3cac8858
Cars Report
This example displays a loading message followed by a text report of cars priced under $3,000. It fetches car data from a local JSON array wrapped in a Promise via `getCars`. The `generateReport` function filters the cars, formats each with `formatCar` (which outputs like “2009 Ford F150: $3000”), and joins the strings. The React starter code renders the final report into a `<pre>` element using `textContent`.
AI-generated descriptionReact Starter code.