Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Nnlp-user
Last edited Mar 17, 2020
Created on Mar 17, 2020
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes