Skip to main content
100%

Cars Report

✓ Published0🌍 Public
WWai Kit Tsang
Last edited Jul 2, 2020
Created on Jul 2, 2020
Forked from Cars Report

This example demonstrates a text-based report of cars filtered by price, displaying only vehicles under $2,000 with their year, make, model, and cost. It uses JavaScript modules with exported functions, including `getCars` which parses a static JSON array and returns it via a `Promise` with a simulated delay, and `generateReport`, which filters and formats the data using template literals. The page initially shows "Loading..." and then updates a `<pre>` element with the generated report. It relies on native `Promise` and `JSON.parse` APIs.

AI-generated description

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

MIT Licensed

Similar vizzes