Fork of Cars Report
✓ Published0🌍 Public
This example demonstrates a JavaScript data-processing pipeline that fetches a JSON array of car listings and outputs a formatted text report of cars priced under $2,000. The `getCars` function simulates a delayed API response using a Promise and `setTimeout`, while `generateReport` filters and maps the data with `filter` and `map`, producing a newline-separated summary via `join`. The final report is rendered directly into an HTML `<pre>` element using `textContent`, with a "Loading..." placeholder shown initially.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed