Skip to main content
100%

Cars Report

✓ Published0🌍 Public
AAparnaPSha
Last edited May 15, 2020
Created on May 15, 2020
Forked from Cars Report

This example demonstrates a text-based report of car listings, showing each vehicle’s year, make, model, and price, filtered to include only cars under a $2,000 threshold. It uses a simulated asynchronous data source via `getCars()` with a `Promise` and `setTimeout`, then processes the data with `generateReport()`, which applies `Array.filter`, `Array.map`, and `formatCar()` to build a formatted string. The output is displayed in a `<pre>` element, updated after a two-second loading delay using the DOM API `document.getElementById`. No external libraries are used, relying solely on vanilla JavaScript and HTML.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes