Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Cars Report

0 stars0🌍 Public
Ffra-alaimo
Last edited Nov 30, 2019
Created on Nov 30, 2019
Forked from Cars Report

This example demonstrates how asynchronous data fetching and modular JavaScript can be used to generate a simple text-based report of used cars. After a two-second simulated delay, a list of cars priced under $2,000 is displayed on the page. The code relies on native ES modules for importing and exporting functions, the `Promise` API with `setTimeout` for the delayed data retrieval, and `JSON.parse` to convert an embedded JSON string into an array of car objects. The final output is rendered into a `<pre>` element using the DOM method `textContent`.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed