Skip to main content
100%

Second Cars

✓ Published0🌍 Public
DDuong Ky Lan
Last edited Jan 12, 2021
Created on Jan 12, 2021
Forked from Cars Report

This example demonstrates how JavaScript objects, arrays, and modules can be combined to generate a text-based report of affordable secondhand cars. It shows a loading message, then fetches a hardcoded JSON array of five vehicles via a simulated asynchronous Promise, filters those under $2,000, and formats the results using template literals. The code uses native `JSON.parse`, Promises, `Array.filter`, `Array.map`, and `Array.join`, with ES module imports and exports for `formatCar.js`, `generateReport.js`, and `getCars.js`.

AI-generated description

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

MIT Licensed

Similar vizzes