Skip to main content
100%

Cars Report

✓ Published1🌍 Public
GGiant316
Last edited Dec 27, 2019
Created on Dec 25, 2019
Forked from React Starter

This example demonstrates a loading state and a text report of cars under a price threshold, using JavaScript promises and array methods. It fetches car data from a hardcoded JSON string via the `getCars` function, which resolves after a 2-second delay. The `generateReport` function filters cars by price and formats each entry using the `formatCar` utility, displaying results in a `<pre>` element. The page initially shows "Loading..." then updates with the report, relying on native `Promise`, `setTimeout`, and DOM manipulation through `getElementById`.

AI-generated description

An example tutorial

MIT Licensed

Similar vizzes