Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

c24a0f6cf8ad4159b5cf5b6afb4f8d53

Cars Report

0 stars1🌍 Public
Ddenis-matriks
Last edited May 27, 2020
Created on May 27, 2020
Forked from Cars Report

This example displays a generated report of cars priced under a user-defined threshold, showing a filtered list of vehicle descriptions. It demonstrates JavaScript data handling by parsing a hardcoded JSON array of car objects (including year, make, model, and price) through the `JSON.parse` API, then asynchronously fetching the data with a custom `getCars` function that simulates a two-second delay via `Promise` and `setTimeout`. The report is assembled using array methods like `filter` and `map`, with a modular `formatCar` function that formats each car as a readable string, and the final output is rendered into an HTML `<pre>` element using the DOM API `textContent`.

AI-generated description

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