🌍 Public
Cars Report
This example shows a text-based report of used cars priced under $2,000, formatted as a list of lines such as “2012 Nissan Leaf: $1800.” It filters a static JSON array of car objects, transforms each matching entry with a destructuring template literal, and joins the results with newlines. The report is written into a `<pre>` element via `document.getElementById` and `textContent`. The code uses ES modules, `JSON.parse`, `Array.filter`, `Array.map`, and `Array.join`.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed








Comments
Sign in to join the discussion.