Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Cars Report

Public visualization

Viewing a saved revision (read-only)

5c628f00c13447f5b0bf3e005d26e07c

Fork of Cars Report

0 stars0🌍 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.