Skip to main content
100%

Cars Report

✓ Published0🌍 Public
SSibel Tanoglu
Last edited Sep 9, 2020
Created on Sep 9, 2020
Forked from Cars Report

This example demonstrates a simple text-based report of used cars filtered by price, displaying each vehicle’s year, make, model, and cost in a preformatted HTML element. It shows how JavaScript modules and Promises structure asynchronous data loading and transformation. The code uses `getCars()` to return a parsed JSON array after a two-second delay, then applies `generateReport` with `filter` and `map` to select cars under $2,000 and format them via `formatCar`. The final output is rendered into the DOM using `document.getElementById` and `textContent`.

AI-generated description

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

MIT Licensed

Similar vizzes