Javascript for-loop, itterate only once a day
===

I was just wondering if it is possible to have a javascript for loop that only iterates through the loop once a day i.e. when the date changes?

    for(i=0; i < myArray.length; i++){

        alert(myArray[i]);

    }

So in the above loop, let it run, and freeze it or something only till the data changes, and the do another iteration, and just keep on doing that.. You know what I mean.

Thanks in advance!