🌍 Public
Viewing a saved revision (read-only)
8d4e72b2f4284b598312b462215915d1
Cars Report
This example displays a filtered list of cars priced under $2000, formatted as text lines in a large HTML `<pre>` element. It demonstrates simple data handling in JavaScript, using a hardcoded JSON array of car objects (make, model, year, price) and the `Array.filter` method to select qualifying entries. The `formatCar` function, imported from a separate module, converts each car object into a readable string, and the results are joined with newlines before being injected into the DOM via `document.getElementById` and `textContent`.
AI-generated descriptionAn example showing the capabilities of VizHub.