Cars Report
✓ Published1🌍 Public
This example demonstrates a simple asynchronous report generator that filters a hardcoded JSON array of used cars by price and formats the results into a text list. It shows how JavaScript modules, promises, and array methods can create a dynamic message that appears after a simulated two-second delay. The code uses `JSON.parse`, `Promise`, `setTimeout`, `filter`, `map`, and `join`, with data stored in a static string in `getCars.js`. The final report is displayed in a `<pre>` element on an HTML page, styled with custom CSS that highlights one entry in red.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed