Skip to main content
100%

Fork of Cars Report

✓ Published0🌍 Public
SSushant S Durgekar
Last edited Nov 22, 2022
Created on Nov 22, 2022
Forked from Cars Report

This example demonstrates a simple text-based data report generator. It loads a list of car objects stored as a JSON string, filters them to show only those priced under $2,000, and formats each entry as a line like "2009 Ford F150: $1950". The output is rendered directly into an HTML `<pre>` element. The code uses JavaScript promises with a simulated delay via `setTimeout` within `getCars`, and it imports and uses the `formatCar` and `generateReport` functions from separate modules to structure the data processing and final message string.

AI-generated description

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

MIT Licensed

Similar vizzes