Skip to main content
100%

Cars Report

✓ Published0🌍 Public
MMusikdude
Last edited Feb 13, 2020
Created on Feb 13, 2020
Forked from Cars Report

This example demonstrates a simple text-based car report generated from a JSON array of car objects. The page initially displays the make of the first car, while a separate module, `generateReport.js`, filters cars by price and formats them with `formatCar`. Data loading is simulated asynchronously via `getCars()`, which returns a promise after a two-second delay. The code uses native JavaScript `JSON.parse`, array methods `filter` and `map`, and ES6 module exports, with the final output rendered into an HTML `<pre>` element.

AI-generated description

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

MIT Licensed

Similar vizzes