Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based report of used cars, filtering a list to show only those priced under $2,000 and formatting each entry as a line with the year, make, model, and price. It relies on JavaScript modules and Promises, with `getCars` simulating an asynchronous API call via `setTimeout` and returning parsed JSON data. The `generateReport` function chains array methods like `filter` and `map`, while `formatCar` handles string interpolation for output. The final result is displayed in a `<pre>` element in the DOM.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed