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: array for loop document.getElementById createElement appendChild
0% match

Back to Exercise