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. It imports car data from a local ES6 module, parses it with `JSON.parse`, and filters the array before formatting each entry with a custom `formatCar` function. The final message is rendered into a `pre` element using `document.getElementById` and `textContent`. It demonstrates modular JavaScript imports and template literal string construction.
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