Skip to main content
100%

Cars Report

✓ Published0🌍 Public
SShantanu Tripathi
Last edited Jun 26, 2020
Created on Jun 26, 2020
Forked from Cars Report

This example demonstrates a simple text-based report of used cars, filtering a static JSON array to show only vehicles priced under $2,000 and formatting each entry as a line with year, make, model, and price. The page initially displays "Loading..." and then updates a `<pre>` element with the generated report. The code uses JavaScript modules (`import`/`export`), `JSON.parse` on an embedded string, and `Promise` with `setTimeout` to simulate a two-second data fetch, with `getCars`, `generateReport`, and `formatCar` as custom functions.

AI-generated description

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

MIT Licensed

Similar vizzes