Cars Module
✓ Published0🌍 Public
This example demonstrates a modular JavaScript application that fetches car data asynchronously and filters it to generate a text report. It shows how to structure code with ES6 modules, using `import` and `export` statements for local files and the D3 library via UNPKG. The app uses a `Promise` with `setTimeout` to simulate a 2-second data fetch, then applies `filter` and `map` operations to display cars priced under $2000 in an HTML `<pre>` element. The source data is embedded as a JSON string in `getCars.js`.
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