Difference between arguments in setInterval calls
- by Martin Janiczek
What's the difference between these setInterval calls and which ones should be used?
setInterval("myFunction()",1000)
setInterval("myFunction",1000)
setInterval(myFunction(),1000)
setInterval(myFunction,1000)
My guess is that JS uses eval() on the first two (strings) and calls the latter two directly.
Also, I don't understand the difference…