Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of Cars Report

Public visualization

Fork of Cars Report

0 stars0๐ŸŒ 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.

Comments

Sign in to join the discussion.

MIT Licensed