Skip to main content
100%

Cars Report - 2

✓ Published0🌍 Public
Mmallikgarjuna
Last edited Mar 18, 2020
Created on Mar 17, 2020
Forked from HTML Starter

This example demonstrates how JavaScript can fetch and report used car listings by applying filtering and formatting logic. It shows a car report generated as text, displaying only vehicles priced under $2,000, with each entry formatted as “year make model: $price.” The visualization relies on asynchronous data loading via `getCars`, which returns a promise resolving after a simulated delay, and then uses `generateReport` to filter the parsed JSON array and map each car through the `formatCar` function. The result is rendered into a `<pre>` element on the page, updating its text content from “Loading…” to the final report.

AI-generated description

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

MIT Licensed

Similar vizzes