🌍 Public
Viewing a saved revision (read-only)
f62e01416ffd412fa52f297ca72f5beb
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 descriptionAn example with js arrays ans Promises.