Cars Report
✓ Published0🌍 Public
This example demonstrates a text-based car report generator that filters a hardcoded JSON dataset of five vehicles by price and formats the results. The view initially displays “Loading…” before a Promise-based `setTimeout` simulation delays the data retrieval by two seconds. Using the `getCars` and `generateReport` functions, the code applies a `filter` for cars under $2,000, maps each car through the `formatCar` helper to produce strings like “2009 Chevrolet Trailblazer: $1550,” and joins them with newlines into a plain text report rendered inside an HTML `<pre>` element.
AI-generated descriptionAn example tuturial on how to use objects, arrays and modules.
MIT Licensed