Let\'s say I have a function:
myFunc = function(number) { console.log(\"Booyah! \"+number); }
And I want it to run on a set interval. Sou
You can make something like this.
arr = Array(); arr[0] = "hi"; arr[1] = "bye"; setTimer0 = setInterval(function(id){ console.log(arr[id]) },1000,(0)); setTimer1 = setInterval(function(id){ console.log(arr[id]); },500,(1));
Hope it helps!