Skip to main content
100%

Cars Report

✓ Published1🌍 Public
MMiguel-GC
Last edited Nov 25, 2019
Created on Nov 25, 2019
Forked from Cars Report

This example displays a list of cars filtered by price, showing each car’s year, make, model, and price in a large text element. It uses asynchronous JavaScript with a Promise-based `getCars` function that delays data retrieval by two seconds, simulating a fetch. The initial message “Recuperando datos...” appears until the data resolves, then `generateReport` filters cars under $2000 and formats each line using `formatCar`. The implementation relies on ES6 modules, `JSON.parse`, and `Promise` resolution to update the DOM’s `textContent`.

AI-generated description

An example with js arrays ans Promises.

MIT Licensed

Similar vizzes