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();

function turnWords(){
var fruits = ["banana", "peach", "apple"]
return fruits[0];
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.
But whatever I try, it doesn't work out. I guess I'm overlooking some javascript basics.

Can someone help me with this?