title: delay a for loop with javascript
body: <p>I want to delay a "for loop" for a while but don't know how to do it. </p>
  
  <p>For example. Let's say this "for loop" runs from 0 to 8 and after each i there should be a delay for 2 sek.</p>
  
  <pre><code>for (var i=0; i&lt;8; i++{
    do something...
    wait for 2 sek. and go on with i=i++;
  }
  </code></pre>