What's the preferred way to write this code when both achieve the same thing?
<p>I have a function here that loops through two wrappers and then loops through it's respective children and throws it a number to list out items in numerical order.  Instead of using a for loop, I've decided to use the each jQuery function.  Here is my question:  </p>

<p>Which way is better to achieve this and what are the advantages/disadvantages by going one way or the other??  Is it better to use a for loop??  </p>

<p>This:</p>

<pre><code>$(".articleContentWrapper").each( function () { 
    var i = 1;
    $(this).find(".howToStepNumber").each(function () {
        var b = i++;
        $(this).html(b);
    });
});
</code></pre>

<p>Or this: </p>

<pre><code>$(".articleContentWrapper").each( function () { 
    var i = 1;
    $(this).find(".howToStepNumber").each(function () {
        $(this).html(i++);
    });
});
</code></pre>
