Skip to main content
100%

Cars Report

✓ Published0🌍 Public
AAmit Kumar
Last edited Mar 10, 2020
Created on Mar 10, 2020
Forked from Cars Report

This example demonstrates a text-based car report generated from a hardcoded JSON array of five vehicles. It shows how to filter cars under a specified price threshold and format each entry as a readable string with year, make, model, and cost. The code uses JavaScript’s `JSON.parse` to load the data, a custom `formatCar` module for string interpolation, and a `filter` and `map` pipeline within `generateReport` to produce the output. The result is rendered into a `<pre>` element via `document.getElementById`.

AI-generated description

An example tutorial of how to use JavaScript objects, arrays, and modules.

MIT Licensed

Similar vizzes