Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Yyejichun@naver.com
Last edited Nov 7, 2021
Created on Nov 7, 2021

This example shows a text-based report of cars filtered by price, displaying each vehicle as a formatted line of year, make, model, and cost. It demonstrates JavaScript modules, promises, and asynchronous data loading with `getCars()` returning a promise that resolves after a two-second delay. The `generateReport` function filters the parsed JSON array for cars under a specified price and maps them using `formatCar`, while `index.js` updates the DOM’s `textContent` to render the final report in a `<pre>` element.

AI-generated description

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

MIT Licensed

Similar vizzes