title: How to insert new tr every third iteration in Jade
body: <p>I'm new in node.js and Jade.</p>
  <p>I searched for solutions without success (maybe I asked wrong questions in google, I don't know).</p>
  <p>I want to create table rows in <code>each</code> loop in Jade. The thing is that after every 3rd <code>td</code> I want insert new <code>tr</code>. Normally it's quite simple but with Jade I simply can't achieve that.</p>
  <h3>My Jade file:</h3>
  <pre><code>table
      thead
          tr
              td Header
      tbody
          each item, i in items
              if (i % 3 === 0)
              tr
                  td
                      a(href=&quot;#{baseUrl}/admin.html?id=#{item.id}&quot;)
  </code></pre>
  <p>I know that something is wrong with my <code>if</code> statement. I tried many configurations without luck. I'm sure that it will be quite easy issue.</p>
  <p>Thanks in advance for help!</p>
  <h3>EDIT</h3>
  <p>Based on @Laurent Perrin answer I modified a little my code. Now it creates <code>tr</code>, then 3 <code>td</code> and then new <code>tr</code> so it's a little closer...</p>
  <h3>New Jade</h3>
  <pre><code>if (i % 3 === 0)
     tr
  td: a(href=&quot;#{baseUrl}/admin.html?id=#{item.id}&quot;) dsdsd #{i}
  </code></pre>
  <h3>Generated HTML</h3>
  <pre><code>&lt;tr&gt;&lt;/tr&gt;
  &lt;td&gt;&lt;a href=&quot;...&quot;&gt;0&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;&lt;a href=&quot;...&quot;&gt;1&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;&lt;a href=&quot;...&quot;&gt;2&lt;/a&gt;&lt;/td&gt;
  &lt;tr&gt;&lt;/tr&gt;
  </code></pre>