Skip to main content
100%

Fork of Cars Report

✓ Published1🌍 Public
Aakshayms0
Last edited Dec 26, 2022
Created on Dec 26, 2022
Forked from Cars Report

This example demonstrates the interaction between asynchronous data loading and report generation in JavaScript. It shows a simple text-based report of cars under a specified price threshold, displayed in a large font after a two-second loading delay. The code uses the native `Promise` API and `setTimeout` in `getCars.js` to simulate fetching hardcoded JSON data, then the `generateReport` module filters, maps, and joins the array using `Array.filter`, `Array.map`, and `Array.join`. The final output renders in an HTML `<pre>` element via `document.getElementById`, with modules imported and bundled through Rollup.

AI-generated description

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

MIT Licensed

Similar vizzes