Python while loop conversion to Javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/758688/sleep-in-javascript">Sleep in Javascript</a><br>
  <a href="http://stackoverflow.com/questions/951021/what-do-i-do-if-i-want-a-javascript-version-of-sleep">What do I do if I want a JavaScript version of sleep()?</a>  </p>
</blockquote>



<p>How would I convert the following:</p>

<pre><code>while True:
    # do something
    time.sleep(2)
</code></pre>

<p>into javascript?</p>
