Skip to main content
100%

Fork of Cars Report

✓ Published0🌍 Public
BBKirst3
Last edited Feb 6, 2021
Created on Feb 6, 2021

This example shows a simple asynchronous report generator for a car inventory. It displays a filtered list of cars under a given price threshold, formatted as text lines. The code uses JavaScript modules and Promises: `getCars()` returns a Promise that resolves a parsed JSON array after a simulated delay, while `generateReport()` filters and maps the data using `Array.filter` and `Array.map` with a custom `formatCar` function. The final message is written into the DOM via `textContent`.

AI-generated description

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

MIT Licensed

Similar vizzes