Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Second Cars

Public visualization

Viewing a saved revision (read-only)

9ee50832b5954f1d8908290486461a2d

Second Cars

0 stars0🌍 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.