Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Jjhofang
Last edited Dec 25, 2019
Created on Dec 25, 2019
Forked from Cars Report

This example demonstrates an asynchronous data-loading pattern for a car inventory report. It displays a list of five car objects, each containing year, make, model, and price fields, rendered as plain text in a large HTML `<pre>` element. The code uses a custom `getCars()` function that returns a Promise, resolving the parsed JSON data after a simulated two-second delay. The implementation relies on native JavaScript features: `JSON.parse` for parsing the embedded JSON string, `export` and `import` for module structure, and `setTimeout` inside the Promise to mimic network latency. The report itself is static text without any visual chart or interactive elements, focusing purely on demonstrating asynchronous data retrieval and module organization.

AI-generated description

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

MIT Licensed

Similar vizzes