Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

65fe1263ee8341eca12f715344c4f9d3

Cars Report

0 stars0🌍 Public
KKaleb LaBarrie
Last edited Jul 23, 2021
Created on Jul 22, 2021
Forked from D3 Starter

This example demonstrates a text-based car report generator that filters a hardcoded JSON dataset of five vehicles by price and formats the results. The view initially displays “Loading…” before a Promise-based `setTimeout` simulation delays the data retrieval by two seconds. Using the `getCars` and `generateReport` functions, the code applies a `filter` for cars under $2,000, maps each car through the `formatCar` helper to produce strings like “2009 Chevrolet Trailblazer: $1550,” and joins them with newlines into a plain text report rendered inside an HTML `<pre>` element.

AI-generated description

An example tuturial on how to use objects, arrays and modules.