Cars Report
✓ Published0🌍 Public
This example demonstrates a simple data-reporting application that loads car data asynchronously and displays a text-based report filtered by price. It shows how a promise-based `getCars` function simulates fetching a JSON dataset containing car year, make, model, and price, then uses `generateReport` to filter vehicles under a specified price and format each line with `formatCar`. The `index.js` file binds this logic to the DOM, setting an initial "loading..." message and updating a `<pre>` element once the data resolves. The code relies on native ES6 modules, `Promise` and `setTimeout` for simulated latency, and string template literals for output formatting.
AI-generated descriptionAn example showing the capabilities of VizHub.
MIT Licensed