Car Report
✓ Published0🌍 Public
This example displays a filtered list of cars from a static JSON array, showing each vehicle’s year, make, model, and price. The code imports the `cars` data from a local ES6 module and uses JavaScript’s `Array.filter` and `Array.map` to select only cars priced under $2,000 and format them as text lines. The output appears in an HTML `<pre>` element via `document.getElementById().textContent`. It uses no external libraries, relying solely on native JavaScript and ES6 module syntax.
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