I want to make an animation of text in a particular DIV.
I'm trying to explain it with a simple example:
var yourDiv = document.getElementById('yourDiv');
yourDiv.innerHTML = turnWords();
var fruits = ["banana", "peach", "apple"]
In this case, the word "banana" shows up in the DIV.
But now, every 500 miliseconds, the innerHTML of that DIV needs to get another fruit inside.
I thought about a setTimeOut function with a loop that goes infinitely through the elements of the fruits Array.
Can someone help me with this?