🌍 Public
Viewing a saved revision (read-only)
8e5f84f3e9404e4c97de8218c6d8b87e
cars reports
This example demonstrates a text-based report of car listings filtered by price. It shows how asynchronous data loading and string formatting can drive a simple DOM update. The code uses `getCars` to return a Promise that resolves a hardcoded JSON array after a 1-second timeout, then `generateReport` filters cars under a max price and maps them through `formatCar` into readable lines. The result is displayed in a `<pre>` element via `document.getElementById`, with styling applied through an inline style attribute.
AI-generated descriptionAn example showing the capabilities of VizHub.