snipt

Ctrl+h for KB shortcuts

Text only

Iterate number in Jade

1
2
3
4
- for (var i = 1; i <= 14; ++i) {
.card
	img(src='img/presentations/blog/#{i}.jpg')
- }
https://snipt.net/embed/384393f571c262216676fc27f35f0ada/
/raw/384393f571c262216676fc27f35f0ada/
384393f571c262216676fc27f35f0ada
text
Text only
4
2016-11-07T13:24:36
True
False
True
Dec 29, 2013 at 08:10 AM
/api/public/snipt/102889/
iterate-number-in-jade
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>- for (var i = 1; i &lt;= 14; ++i) { </span><span id="L-2"><a name="L-2"></a>.card </span><span id="L-3"><a name="L-3"></a> img(src=&#39;img/presentations/blog/#{i}.jpg&#39;) </span><span id="L-4"><a name="L-4"></a>- } </span></pre></div> </td></tr></table>
each, for, jade