title: js while(true){} blocks event loop
body: <pre><code>setInterval(function(){console.log(&quot;hello&quot;)},2000);
  while(true){}
  </code></pre>
  <p>&quot;hello&quot; never gets printed.</p>
  <p>I think event loop runs in a different thread, but here it seems like 'while loop' is preventing the 'event loop' from execution.
  <strong>Can somebody put some light on this?</strong></p>