I have written a javascript function that uses setInterval to manipulate a string every tenth of a second for a certain number of iterations.
function timer(
(function variableInterval() { //whatever needs to be done interval *= 2; //deal with your interval setTimeout(variableInterval, interval); //whatever needs to be done })();
can't get any shorter