Skip to main content
100%

Cars Report

✓ Published0🌍 Public
PPhilippe Bonnet Doring
Last edited Apr 7, 2020
Created on Apr 7, 2020
Forked from Cars Report

This example displays a filtered list of used cars with prices under $2,000, loading after a two-second delay. It shows how to structure data with JavaScript objects and arrays, using the `JSON.parse` method to interpret inline JSON data. The code demonstrates asynchronous data retrieval with a `Promise` returned by `getCars`, and formatting logic via the exported `formatCar` function. The report is generated by chaining `filter`, `map`, and `join` methods in `generateReport`, with the output rendered as text content into the page’s `pre` element.

AI-generated description

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

MIT Licensed

Similar vizzes