Cars Report
✓ Published0🌍 Public
This example shows a text-based cars report that filters a hardcoded list of five vehicle objects by price and formats each as a line of text. The code uses JavaScript promises, array methods (`filter`, `map`, `join`), template literals, and ES6 module imports/exports. After a simulated two-second delay, `getCars()` resolves with parsed JSON data, then `generateReport()` selects cars under $2,000 and renders the formatted results in the page’s `<pre>` element, replacing the initial "Loading..." message.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed