JavaScript
Intermediate
Fruit List Generator
task_alt
Objectives
- Build a script that loops through the array ["apple","banana","mango"] and displays each fruit inside an HTML ul list. Start with a blank ul in the HTML and use document.getElementById to insert li items dynamically.
- > Required code element: Use: array, for loop, document.getElementById, createElement, appendChild
warning
Warning:
Launching this exercise opens an isolated playground environment. Progress is temporary and will reset if you close the editor window.