Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Cars Report

0 stars0🌍 Public
AAhmed Negm
Last edited Aug 10, 2020
Created on Aug 10, 2020
Forked from HTML Starter

This example demonstrates an asynchronous text report generator. It shows how a React-based web application loads mock data and filters it to display a formatted list of cars under a price threshold. The code uses static JSON parsed with `JSON.parse` and a delayed Promise via `setTimeout` to simulate fetching data. The `getCars` function returns a Promise, and `generateReport` filters and maps car objects using `Array.filter` and `Array.map`, while `formatCar` constructs descriptive strings. The report appears in an HTML `<pre>` element after a "Loading..." state.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed