Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Cars Report

Public visualization

Viewing a saved revision (read-only)

27633230e6944eb280f4075719c8c962

Fork of Cars Report

0 stars0🌍 Public
Zzcz-hjy
Last edited May 16, 2021
Created on May 16, 2021
Forked from Cars Report

This example demonstrates a JavaScript data-processing pipeline that fetches a JSON array of car listings and outputs a formatted text report of cars priced under $2,000. The `getCars` function simulates a delayed API response using a Promise and `setTimeout`, while `generateReport` filters and maps the data with `filter` and `map`, producing a newline-separated summary via `join`. The final report is rendered directly into an HTML `<pre>` element using `textContent`, with a "Loading..." placeholder shown initially.

AI-generated description

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