Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Cars Report

Public visualization

Viewing a saved revision (read-only)

ecd24a917f2141888e85f2584b527d70

Fork of Cars Report

0 stars0🌍 Public
WWeiyiDeng
Last edited Feb 15, 2022
Created on Feb 15, 2022
Forked from Cars Report

This example demonstrates how JavaScript objects, arrays, and modules can build a simple text-based car report. It filters a hardcoded JSON dataset of five cars by price, formats each qualifying entry with the `formatCar` function, and displays the results in a large HTML `<pre>` element. The code uses `Promise` and `setTimeout` in `getCars.js` to simulate an asynchronous data fetch, while `generateReport.js` chains array methods like `filter`, `map`, and `join`. The visualization is purely textual, updating the page from "Loading..." to the final list after a two-second delay.

AI-generated description

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