Cars Report
✓ Published0🌍 Public
This example demonstrates a text-based report of cars filtered by price, displaying only vehicles under $2,000 with their year, make, model, and cost. It uses JavaScript modules with exported functions, including `getCars` which parses a static JSON array and returns it via a `Promise` with a simulated delay, and `generateReport`, which filters and formats the data using template literals. The page initially shows "Loading..." and then updates a `<pre>` element with the generated report. It relies on native `Promise` and `JSON.parse` APIs.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed