Skip to main content
100%

Cars Report

✓ Published2🌍 Public
Mmuhammadumair41
Last edited Jun 18, 2020
Created on Jun 18, 2020
Forked from Cars Report

This example shows a simple text-based report of cars, displaying year, make, model, and price after an asynchronous loading delay. The report filters cars by price and formats each entry using the `formatCar` function. The main script uses JavaScript promises and the `setTimeout` API via `getCars` to simulate fetching data. The `generateReport` module chains `filter` and `map` to process the parsed JSON array. The interface consists of a single `<pre>` element updated via the DOM `textContent` property, with the initial “Loading …” message replaced once the data arrives.

AI-generated description

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

MIT Licensed

Similar vizzes