Cars Report
✓ Published1🌍 Public
This example shows a simple text-based report of car listings filtered by price. It demonstrates asynchronous data fetching with a mock API using JavaScript Promises, and modular code organization with ES6 exports and imports. The `getCars` function simulates a two-second delay before returning parsed JSON car data, while `generateReport` filters cars under a specified price and formats each entry using a template literal in `formatCar`. The result replaces the initial "loading..." text in an HTML `<pre>` element.
AI-generated descriptionAn example tutorial how to use JavaScript objects, arrays and modules
MIT Licensed