Skip to main content
100%

Cars Report

✓ Published1🌍 Public
AA1L9E9X9
Last edited Oct 9, 2020
Created on Oct 9, 2020
Forked from Cars Report

This example demonstrates how to fetch and display a text report of used cars priced under $2,000. The page initially shows “Loading...” while a promise-based `getCars()` function simulates a two-second delay before resolving with a hardcoded JSON array. The `generateReport` function filters that array and applies `formatCar` to produce a formatted list with year, make, model, and price. It uses JavaScript ES6 modules, destructuring, `JSON.parse`, and `Promise` with `setTimeout` to mimic asynchronous data retrieval.

AI-generated description

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

MIT Licensed

Similar vizzes