🌍 Public
Viewing a saved revision (read-only)
41e5d5e871864766b1ef6eafed6df6f8
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