Dataviz Course - Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based data report that filters and formats car listings by price. It initially displays “Loading...” before fetching car data asynchronously, then outputs a formatted list of vehicles under a $2,000 price threshold. The code uses JavaScript modules with ES6 import/export syntax, a Promise-based `getCars` function with a simulated 2-second delay, and array methods like `filter`, `map`, and `join` to generate the final report. The data source is a hardcoded JSON array of five car objects, rendered directly into the page’s `<pre>` element via the DOM API.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays, and modules.
MIT Licensed