title: "Stray timeout" - what does the empty timeout in javascript do?
body: <p>I'm going thru some legacy code and I've noticed the following line(s):</p>
  
  <pre><code>// Stray timeout
  var t = setTimeout('',1);
  </code></pre>
  
  <p>Does it do anything? Is it really required?</p>
  
  <hr>
  
  <p>There is a following question on SO: <a href="https://stackoverflow.com/questions/779379/why-is-settimeoutfn-0-sometimes-useful">Why is setTimeout(fn, 0) sometimes useful?</a></p>
  
  <blockquote>
    <p>The solution is to "pause" the JavaScript execution to let the rendering threads catch up. And this is the effect that setTimeout() with a timeout of 0 does. It is like a thread/process yield in C. Although it seems to say "run this immediately" it actually gives the browser a chance to finish doing some none-JavaScript things that have been waiting to finish before attending to this new piece of JavaScript.</p>
  </blockquote>
  
  <p>That explains benefits of executing a function in setTimeout. But how about executing an empty string?</p>