Skip to main content
100%

Cars Report with Promises

✓ Published0🌍 Public
Hhugomell
Last edited Jul 20, 2020
Created on Jul 20, 2020
Forked from Cars Report

This example demonstrates asynchronous data handling by displaying a filtered list of cars below a price threshold. A loading message appears first, then after a two-second delay, the report renders in large text. The code uses JavaScript Promises with `getCars` and `setTimeout` to simulate a delayed API response, while `generateReport` chains `filter`, `map`, and `join` operations to format car details from a hardcoded JSON array. The `formatCar` module constructs each line.

AI-generated description

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

MIT Licensed

Similar vizzes