So I have a timer that looks like this
my_timer = setInterval(function(){
do_something_amazing();
do_more.stuff_here();
var etc_etc = "foo" + bar;
}, 1000);
And I want it to run immediately, and every second after that. I tried appending () to the end of the function, but that caused it to run only once (because it is not returning the function itself to the setInterval?). I then tried to return this;
so that it would possibly return the function itself, but that did no good either. That was a random guess.
Is there any way I can get this to work without creating a named function? Thanks!