const fruits = [ "Banana", "Orange", "Apple", "Mango" ]; const f = fruits.entries(); for(let x of f) { document.getElementById("demo").innerHTML += x; }