Please advise how to pass parameters into a function called using setInterval.
setInterval
My example setInterval(funca(10,3), 500); is incorrect.
setInterval(funca(10,3), 500);
You need to create an anonymous function so the actual function isn't executed right away.
setInterval( function() { funca(10,3); }, 500 );
2.1m questions
2.1m answers
60 comments
57.0k users