Skip to main content
100%

Cars Report

✓ Published1🌍 Public
JJoshuaBruens
Last edited Feb 14, 2020
Created on Feb 14, 2020
Forked from Cars Report

This example displays a text-based report of cars filtered by price, showing formatted entries such as "2000 Honda accord: $2600" in a large <pre> element. The page initially shows a "Loading..." message while a Promise from `getCars()` waits two seconds before resolving with a hardcoded JSON array of car objects. After resolution, the `report` function filters cars using `Array.filter`, formats each with a template literal, and joins them with newlines. The React framework is present in the starter code, though the core logic uses plain JavaScript Promises and DOM manipulation via `document.getElementById`.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes