Calling functions with setTimeout()
The first form that you list works, since it will evaluate a string at the end of delay. Using eval() is generally not a good idea, so you should avoid this. The second method doesn’t work, since you immediately execute a function object with the function call operator (). What ends up happening is that … Read more