Skip to main content
100%

Cars Report

✓ Published1🌍 Public
NNathannous
Last edited Apr 27, 2020
Created on Apr 26, 2020
Forked from Cars Report

This example demonstrates generating a text-based car report by filtering a list of used vehicles under a price threshold and formatting each entry with year, make, model, and cost. It loads data as a JSON array via the `getCars` function, which returns a Promise that simulates async fetching with `setTimeout`. The report is built using `Array.filter`, `map`, and `join` in `generateReport`, with `formatCar` handling string interpolation. The final output appears in a `<pre>` element after a brief “Loading…” state, showcasing modular JavaScript with ES6 exports and imports.

AI-generated description

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

MIT Licensed

Similar vizzes