Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

cab84137673e4e8db4bbfe2d4176dcee

Cars Report

0 stars0🌍 Public
YYineng Zhang
Last edited Oct 29, 2020
Created on Oct 29, 2020
Forked from Cars Report

This example builds a text-based report of cars under a $2,000 price limit, displaying each vehicle’s year, make, model, and price in a large HTML `<pre>` element. It demonstrates asynchronous data loading using a Promise with a simulated two-second delay via `setTimeout`, then filters and formats the car objects with JavaScript’s `filter`, `map`, and `join` methods. The code uses ES modules (`import`/`export`) to separate car retrieval, formatting, and report generation, and the final output is injected into the DOM through `textContent`.

AI-generated description

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