Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based report of car listings, showing how to load data asynchronously and generate a formatted summary. It displays five cars with their year, make, model, and price, filtered to include only those under $5,000. The code uses JavaScript ES6 modules, `Promise` with `setTimeout` to simulate a delayed API call via `getCars`, and maps over filtered data with `formatCar` and `generateReport` to produce the output. The rendered result appears in a `<pre>` element as plain text.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed