Skip to main content
100%

Cars Report

✓ Published0🌍 Public
GGel ⟨\g\⟩
Last edited Jul 29, 2019
Created on Jul 29, 2019
Forked from Cars Report

The Cars Report example demonstrates how to fetch, filter, and format car data asynchronously using JavaScript promises and ES6 modules. It shows a loading state followed by a text report listing cars with prices under a specified threshold. The code uses the native `Promise` API via `getCars`, `Array.prototype.filter` and `.map` in `generateReport`, and template literals in `formatCar` to construct the output. The HTML page displays the result in a `<pre>` element, with the source data embedded as a JSON string.

AI-generated description

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

MIT Licensed

Similar vizzes