Skip to main content
100%

Fork of Cars Report

✓ Published0🌍 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.

MIT Licensed

Similar vizzes