I have 2 items in an array. I want to display them in a div element.
But the div element is only showing the 2nd item [5,6,0,8]
of the array.
let myArr = [
[1, 2, 3, 4],
[5, 6, 0, 8],
];
for (let i = 0; i < myArr.length; i++) {
document.getElementById("show").innerHTML = myArr[i];
}
I tried with for each but no luck. However, both items appear on the console log.
Please advise.