Quite often see in JavaScript libraries code like this:
setTimeout(function() { ... }, 0);
I would like to know why use such a wrapper
There are a couple of reasons why you would do this
setTimeout
setInterval