🌍 Public
Viewing a saved revision (read-only)
4ed9da680a3a442ea1123fe5eca99bc2
Cars Report
This example displays a text-based car report listing vehicles under $2,000, formatted as “year make model: price.” It shows a loading message while `getCars` simulates a two-second asynchronous delay via `setTimeout` before resolving a hardcoded JSON array of five cars. The `generateReport` function filters the data by price and maps each car through `formatCar` to produce the final output, which is written into the DOM using `textContent` on the `#message-element` pre element.
AI-generated descriptionAn example Tutorial of Javascript