I want to create a function that begins an interval loop. The interval loop invokes another function.
So something like this:
function myFunction(param1,param2) {
setInterval(function() {
myFunction2(param1,param2);
}, 1000);
}
function myFunction2(param1, param2) {
//do something.
}
But from what I have found so far, setInterval needs to take an annoymous function and obviously param1 and param2 will be undefined.
How could this be acheived?