🌍 Public
Viewing a saved revision (read-only)
388f778406164b2b9a373c29f2df1e8c
Bi's Truck Report
This example shows a simple text-based report that filters a list of cars by price and displays each car’s year, make, model, and cost. It demonstrates JavaScript fundamentals, including arrays, objects, promises, and modular imports. The code uses `getCars` to simulate a two-second async fetch of hardcoded JSON data, then `generateReport` filters entries under $2000 and maps each through `formatCar` to build the output. The result is rendered directly into an HTML `<pre>` element via the DOM API.
AI-generated description