Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Aariashary
Last edited Dec 29, 2019
Created on Dec 29, 2019
Forked from HTML Starter

This example shows a text-based report of cars, listing each vehicle’s year, make, model, and price if it falls under a set maximum price. The page initially displays “Loading...” before fetching data asynchronously via a Promise from `getCars`, which simulates a two-second delay with `setTimeout`. Once loaded, the `generateReport` function filters the parsed JSON array and formats each entry using `formatCar`, then writes the multiline result to a `<pre>` element in the DOM. The code relies on native JavaScript methods like `Array.filter`, `Array.map`, and `Array.join`, with no external visualization libraries.

AI-generated description
MIT Licensed

Similar vizzes