title: Print characters in for loop
body: <p>I have a loop </p>
  
  <pre><code>for (var i=0; i &lt; x; i++){
    // ..
  }
  </code></pre>
  
  <p>I want to wrap each 8 numbers between two characters. So my output would look something like this:</p>
  
  <pre><code>&lt; 0 1 2 3 4 5 6 7 &gt; &lt; 8 9 10 11 12 13 14 15 &gt; &lt; 16 17 18 19 20 21 22 23 &gt; &lt; ...
  </code></pre>
  
  <p>My solution was</p>
  
  <pre><code>if(i == 0) console.info('&lt;');
  if(i == 7) console.info('&gt;');
  if(i == 8) console.info('&lt;');
  if(i == 15) ...
  </code></pre>
  
  <p>But this would be pretty verbose. Is it possible to make this task easier?</p>