How to add a unique number for each reiteration and render it multiple times? I am working on a testimonial slider and each slide is wrapped in an &lt;li&gt; tag. The JS looks for a similar id number, one for each layer of the slide, in this case I need to change the 1 in the example below.

Example:

"rs-1"
id="slide-1-layer-2" 
id="slide-1-layer-3" 

I loop through the entries with a normal {% for %}{% endfor %} statement and I tried rendering the required number (1) with the {{ loop.index }} but I guess you can only use this once...

Is there a method do this? Perhaps with Twig? 

If I am not clear this is what the result should be:

&lt;li&gt;"rs-1"
        id="slide-1-layer-2" 
        id="slide-1-layer-3" 
&lt;/li&gt;
&lt;li&gt;"rs-2"
        id="slide-2-layer-2" 
        id="slide-2-layer-3" 
&lt;/li&gt;
&lt;li&gt;"rs-3"
        id="slide-3-layer-2" 
        id="slide-3-layer-3" 
&lt;/li&gt;


etc...
Set it as a variable inside your loop and you can reuse it all you want.

 {% for entry in craft.entries.section('yourSection') %}
    {% set loopIndex = loop.index %}
    &lt;li&gt;"rs-{{loopIndex}}" id="slide-{{loopIndex}}-layer-2"&lt;/li&gt;
 {% endfor %}