Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

6310ebcf6e324567b33d531135476416

Cars Report

0 stars0🌍 Public
Kkalokli8
Last edited Mar 31, 2020
Created on Mar 31, 2020
Forked from Cars Report

This example demonstrates a simple text-based report of used cars, displaying a filtered list of vehicles priced under $2,000 in a large HTML `<pre>` element. It shows how JavaScript modules and Promises structure asynchronous data loading and formatting. The code defines `getCars()` to return a Promise that resolves a hardcoded JSON array after a two-second delay, while `generateReport()` filters and maps the data using the `formatCar` helper. The main script updates the page’s `textContent` from “Loading...” to the final report, using ES6 module imports and exports.

AI-generated description

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