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(
You can use a variable and change the variable instead.
````setInterval([the function], [the variable])```