Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Cars Report

0 stars0🌍 Public
FFuertes503
Last edited Jul 14, 2020
Created on Jul 14, 2020
Forked from Hello VizHub

This example demonstrates a simple text-based report of five used cars, displaying each vehicle’s year, make, model, and price in a formatted list. The report filters out any car priced above a set maximum, showing results directly in the browser’s `<pre>` element. It uses JavaScript modules, including `getCars()` returning a Promise with a two-second delay to mimic an API, `formatCar` for string concatenation, and `generateReport` chaining `filter` and `map`. The data is defined inline as JSON parsed into objects, with the HTML and CSS providing large, centered text.

AI-generated description

An example of how to use JavaScript objects, arrays and modules.

Comments

Sign in to join the discussion.

MIT Licensed