How many uses of a dynamic value justify making it a variable?
<p>Using jQuery:</p>

<pre><code>        var $activeList = $('.active_list');
        var $activeSlide = $activeList.find('.active_list_slide');
        var slideIndex = $activeList.children().index($activeSlide);
</code></pre>

<p>In the case above, <code>$activeList</code> was used twice. Was it worth it to make it a variable rather than just keeping it as <code>$('.active_list')</code>.</p>

<p>My general rule was always that 2 uses of a dynamic variable make it worth it to make a variable (rather than doing the same operation to find it twice). Is this a good philosophy?</p>
