Menu
I have an array of string and an h1 element. I am trying to replace the innerHTML of the h1 element with a string from the array in the order that the strings are placed in the array.
I am using a for loop but it seems like the index does not increment the way I wanted. I can’t access each individual index in order. It loops through the array very fast and give’s me the last index of the array.
Here’s the code pen: