Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars report

Public visualization

Cars report

0 stars0🌍 Public
RRicardo Tejerina
Last edited Oct 27, 2020
Created on Oct 27, 2020
Forked from React Starter

This example demonstrates a simple asynchronous report generator for car listings, displaying vehicles under a $2,000 price threshold in plain text. It first shows a loading message, then renders the filtered car details as formatted strings. The code uses JavaScript modules with ES6 imports and exports, a `Promise` with `setTimeout` to simulate fetching data from a hardcoded JSON array, and the `Array.filter()` and `Array.map()` methods to process the data. The `formatCar` function formats each car’s year, make, model, and price, while `generateReport` joins them with newlines.

AI-generated description

An example turotial of how to use JavaScript Modules.

Comments

Sign in to join the discussion.

MIT Licensed