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 descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.