Skip to main content
100%

Fork of Cars Report

✓ Published0🌍 Public
Mmelany30031@gmail.com
Last edited Sep 10, 2024
Created on Sep 10, 2024
Forked from Cars Report

This example shows a filtered list of used cars priced under $2,000, displayed as plain text in a large HTML element. It initially shows a "Loading..." message, then asynchronously fetches an in-memory JSON array of five car records, filters them by price, and formats each match as a line with year, make, model, and price. The code uses JavaScript modules (`getCars`, `formatCar`, `generateReport`) with a `Promise` and `setTimeout` to mimic a delayed data source, and renders the result via the DOM’s `textContent`.

AI-generated description

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

MIT Licensed

Similar vizzes