Skip to main content
100%

Cars Report

✓ Published0🌍 Public
SShengjie-Sun
Last edited May 11, 2019
Created on May 11, 2019
Forked from Cars Report

This example demonstrates a simple text-based report of used cars, displaying each vehicle's year, make, model, and price once a loading delay resolves. It shows how JavaScript modules and Promises manage asynchronous data retrieval and formatting. The code uses a custom `getCars` function with `setTimeout` to return parsed JSON data, and `formatCar` with `generateReport` to filter cars under a price threshold. The final message updates the page’s `pre` element via `document.getElementById` and `textContent`, showcasing modular code organization without any visualization libraries.

AI-generated description

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

MIT Licensed

Similar vizzes