Cars Report
✓ Published1🌍 Public
This example demonstrates a simple asynchronous report generator that filters a hardcoded collection of car records by price and displays the matching entries in a web page. The application imports car data from a JSON string embedded in the `getCars.js` module, which uses a JavaScript `Promise` with a `setTimeout` to simulate a delayed API call. The `generateReport.js` module filters cars by a maximum price threshold, formats each entry using the `formatCar` function, and joins them with newlines. The result is rendered into a `<pre>` element in the `index.html` page, with initial loading text shown before the async data arrives.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed