Skip to main content
100%

Cars Report2

✓ Published0🌍 Public
Xxhoumba
Last edited Mar 12, 2020
Created on Mar 12, 2020
Forked from Cars Report2

This example shows a text-based report of used cars under $2,000, generated asynchronously from JSON data. It displays a loading message before printing each car as a formatted line with year, make, model, and price. The code uses ES6 modules, `JSON.parse`, a Promise with `setTimeout`, and `Array.filter` to select cars below the price threshold. It then applies `Array.map` with the custom `formatCar` function. The output appears in a large `<pre>` element updated via `document.getElementById().textContent`.

AI-generated description

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

MIT Licensed

Similar vizzes