Cars Report
✓ Published1🌍 Public
This example displays a simple text report listing cars priced under $2,000, with each entry formatted as the year, make, model, and price. The report is generated by filtering a hardcoded JSON dataset of five used cars, then mapping each matching car through a formatting function. The code demonstrates modular JavaScript with ES6 imports and exports, using template literals for string construction and leveraging the `Array.filter` and `Array.map` methods. The resulting message is inserted into a `<pre>` element in the HTML via the Document Object Model.
AI-generated descriptionAn example showing the capabilities of VizHub.
MIT Licensed