Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Llujinxuan-fang
Last edited Mar 6, 2020
Created on Mar 6, 2020
Forked from Cars Report

This example shows a text-based cars report that filters a hardcoded list of five vehicle objects by price and formats each as a line of text. The code uses JavaScript promises, array methods (`filter`, `map`, `join`), template literals, and ES6 module imports/exports. After a simulated two-second delay, `getCars()` resolves with parsed JSON data, then `generateReport()` selects cars under $2,000 and renders the formatted results in the page’s `<pre>` element, replacing the initial "Loading..." message.

AI-generated description

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

MIT Licensed

Similar vizzes