Cars Report
✓ Published0🌍 Public
This example demonstrates a text-based report of used cars, filtering and formatting a small dataset into readable lines. It shows how JavaScript modules handle asynchronous data and string generation. The code uses `getCars()` with a `Promise` and `setTimeout` to simulate a two-second loading delay, while `generateReport` chains `filter`, `map`, and `join` to prepare the output. The report renders in a `<pre>` element, initially showing "Loading..." and later the formatted list of cars under a price threshold. The example highlights ES module exports, template literals, and array methods like `filter` and `map`.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed