🌍 Public
Viewing a saved revision (read-only)
fe96be18419f4946b57bfe18aff61e94
Cars Report
This example displays a car report by rendering the price of the first car from a static JSON dataset directly into an HTML page. The dataset is defined in a local ES6 module, `cars.js`, which is imported into `index.js` using JavaScript’s `import` syntax. The code retrieves the element with the ID `message-element` and sets its text content to the car’s price value, demonstrating basic DOM manipulation alongside modular code organization and JSON parsing with `JSON.parse`.
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.