Iteration

To iterate over sequences and objects you would use the "each" keyword. Unlike other languages there is no need to parentheses or curly braces.

Jade
HTML
<li>foo</li>
<li>bar</li>
<li>baz</li>

You can also use the "for" keyword.

Jade
HTML
<li>foo</li>
<li>bar</li>
<li>baz</li>

You can get indexes with an additional parameter in the loop.

Jade
HTML
<li>foo</li>
<li>0</li>
<li>bar</li>
<li>1</li>
<li>baz</li>
<li>2</li>