Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

0e848ac37576400287d501783148cb4c

Cars Report

0 stars0🌍 Public
PPaulCaballero
Last edited Aug 22, 2019
Created on Aug 22, 2019
Forked from Cars Report

This example demonstrates a simple text-based report of car listings, showing each car’s year, make, model, and price when priced under a given threshold. The page initially displays “Loading…” while a promise-based `getCars()` function simulates a two-second delay before resolving a hardcoded JSON array of five cars. The `generateReport()` function filters the array, maps each car through `formatCar()` to format the string, and joins them with newlines into a single report. No external libraries are used; the code relies on native JavaScript promises, array methods, and ES modules.

AI-generated description

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