Cars Report
✓ Published0🌍 Public
This example generates a text-based report of cars priced under $2,000, displaying each car’s year, make, model, and price in a large-font `<pre>` element. It demonstrates ES6 module imports and asynchronous data loading, using `getCars()` to return a promise that resolves with a hardcoded JSON dataset after a two-second delay. The report is formatted by `formatCar` and generated with `generateReport`, which filters and maps the data, then joins lines with newline characters. The visualization relies on plain JavaScript, Promises, and DOM textContent manipulation, with no external libraries.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed