Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Cars Report

0 stars0🌍 Public
TTravy Trav
Last edited Feb 24, 2020
Created on Feb 24, 2020
Forked from Cars Report

This example demonstrates how to generate a plain-text car report by filtering a hardcoded JSON array of five vehicles and formatting each result. The page initially shows “Loading…” and then displays a list of cars priced under $2,000 after a simulated two-second delay. The code uses JavaScript modules with `export`/`import` to separate data retrieval (`getCars` returning a Promise), formatting via `formatCar`, and filtering/joining logic in `generateReport`. The final output is rendered into a `<pre>` element using `textContent`.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed