🌍 Public
Viewing a saved revision (read-only)
ba95e4d26bf14395834b2b402782d545
Cars Report
This example shows a plain-text report of used cars filtered by a maximum price. It demonstrates how to work with JavaScript objects, arrays, and modules by fetching car data asynchronously, formatting each vehicle into a readable string, and displaying the results in a `<pre>` element. The code uses native JavaScript promises via `setTimeout` for simulated async loading, module exports/imports, and the `Array.filter`, `Array.map`, and `Array.join` methods. The final output lists cars under $2000, with the page initially showing "Loading..." before the data arrives.
AI-generated descriptionAn example tutorial of how to use JavaScript objects, arrays and modules.