Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based report of used cars, filtering a static JSON array to show only vehicles priced under $2,000 and formatting each entry as a line with year, make, model, and price. The page initially displays "Loading..." and then updates a `<pre>` element with the generated report. The code uses JavaScript modules (`import`/`export`), `JSON.parse` on an embedded string, and `Promise` with `setTimeout` to simulate a two-second data fetch, with `getCars`, `generateReport`, and `formatCar` as custom functions.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed