Fork of HTML Starter
✓ Published0🌍 Public
This example demonstrates a basic asynchronous report generator that filters a hardcoded array of car objects by price and displays the results as text in the browser. It shows a loading message while the `getCars` promise simulates a two-second delay, then renders each car’s year, make, model, and price using `generateReport` and `formatCar` functions. The code uses the native `Promise` and `setTimeout` APIs, with the DOM updated via `getElementById` and `textContent` in a plain HTML page styled by `styles.css`. The filter threshold is set to 2000, producing a list of affordable vehicles.
AI-generated descriptionMIT Licensed