Skip to main content
100%

Dataviz Course - Cars Report

✓ Published0🌍 Public
Hhugomell
Last edited Jul 20, 2020
Created on Jul 20, 2020
Forked from Cars Report

This example demonstrates a simple text-based data report that filters and formats car listings by price. It initially displays “Loading...” before fetching car data asynchronously, then outputs a formatted list of vehicles under a $2,000 price threshold. The code uses JavaScript modules with ES6 import/export syntax, a Promise-based `getCars` function with a simulated 2-second delay, and array methods like `filter`, `map`, and `join` to generate the final report. The data source is a hardcoded JSON array of five car objects, rendered directly into the page’s `<pre>` element via the DOM API.

AI-generated description

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

MIT Licensed

Similar vizzes