Wednesday, February 10, 2016

javascript: setTimeout 0

means the function will be executed 5 seconds later.

but what does it mean if the time is set to 0, like this
it means the function will be deferred and executed at the end of stack (the current executing method).

In this video, it explains it.
https://www.youtube.com/watch?v=8aGhZQkoFbQ

http://danmartensen.svbtle.com/events-concurrency-and-javascript

No comments:

Post a Comment