Skip to main content
100%

Cars Report

✓ Published0🌍 Public
SShidharth997
Last edited Nov 8, 2020
Created on Nov 8, 2020
Forked from Cars Report

This example demonstrates a simple text-based report of cars, filtering a list of vehicle data by price and formatting each match as a readable string. It shows how JavaScript modules handle asynchronous data loading and report generation. The app uses `getCars()` to return a promise that resolves with an in-memory JSON array of car objects after a simulated delay, sorted through `Array.filter`, formatted via a custom `formatCar` function, and joined into a single text output. The HTML page updates a `<pre>` element’s content in `index.js`, initially displaying “Loading...” before the report appears.

AI-generated description

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

MIT Licensed

Similar vizzes