Skip to main content
100%

Fork of Cars Report

✓ Published1🌍 Public
Ggabrielribeirob
Last edited Aug 30, 2021
Created on Aug 30, 2021
Forked from Cars Report

This example shows a text-based car report that filters a static JSON dataset of five used cars to display only those priced under $2,000. The interface initially shows a loading message before a two-second delay simulates an asynchronous fetch using `getCars()`, which returns a promise. The `generateReport` function uses JavaScript’s `filter` and `map` methods to format each qualifying car into a single line using the `formatCar` module. Output is rendered directly into an HTML `<pre>` element via `document.getElementById`.

AI-generated description

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

MIT Licensed

Similar vizzes