🌍 Public
Cars Report
This example displays a text-based report of cars at or below a $2,000 price threshold, listing each vehicle’s year, make, model, and formatted price. It initially shows a “Loading…” message, then asynchronously fetches a hardcoded JSON dataset after a two-second delay using a custom `getCars` promise. The `generateReport` function filters the data by price, maps each car through `formatCar`, and joins the results into a string displayed in a `<pre>` element. The code relies on native JavaScript promises and template literals without any external visualization libraries.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.