Cars Report
✓ Published0🌍 Public
This example displays a text-based report of cars priced under $2,000, listing each vehicle’s year, make, model, and price. The page initially shows a “Loading...” message, then uses a JavaScript Promise to simulate a two-second delay before fetching a hardcoded JSON array of five cars. The `generateReport` function filters the data by price, formats each entry with a custom `formatCar` helper, and joins the results into a multi-line string rendered inside an HTML `<pre>` element via the browser’s DOM manipulation API.
AI-generated descriptionMIT Licensed