Skip to main content
Public

Share visualization

Loading preview…

HTML Cars Report

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

HTML Cars Report

1
MMithun Ghosh
Last edited Nov 24, 2020
Created on Nov 24, 2020
Forked from Cars Report

This example demonstrates a simple asynchronous report that filters a hardcoded JSON array of used cars by price and displays the results as text on a webpage. It shows a loading message initially, then after a simulated two-second delay, the filtered list of cars under $2000 appears. The code uses JavaScript modules with `export` and `import` statements, including `getCars()` which returns a Promise via `setTimeout`, `generateReport()` which chains `filter()` and `map()`, and `formatCar()` for string formatting. The DOM is updated using `document.getElementById` to change the text content of a message element.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed