Skip to main content
100%

Cars Report

✓ Published1🌍 Public
Wwindsoftheo
Last edited Dec 17, 2020
Created on Dec 16, 2020
Forked from React Starter

This example demonstrates a text-based report of cars filtered by price, displayed in a large `<pre>` element. It fetches car data from an embedded JSON array via the custom `getCars()` promise, which simulates a two-second delay. The `generateReport` function filters cars under a 2000-dollar threshold using array methods, then formats each entry with `formatCar` before joining lines. The page initially shows "Loading..." and updates to the report using vanilla JavaScript and ES modules.

AI-generated description

An example module on using arrays and modules.

MIT Licensed

Similar vizzes