Cars Report
✓ Published0🌍 Public
This example displays a text-based report of used cars priced under $2,000, with each entry formatted as “year make model: price” and separated by newlines. After a brief “Loading...” state, the report appears once data arrives, filtering five car records from an inline JSON array. The code demonstrates modular JavaScript with ES modules, using `getCars()` to return a Promise that resolves after a two-second delay, and `generateReport()` to filter and map the data. The output is rendered into an HTML `<pre>` element via `textContent`.
AI-generated descriptionAn example tutorial of how to use JS objects, arrays, and modules. (oh, and also typing, i.e. how to write and stuff)
MIT Licensed