JavaScript loop running indefinately
<p>so, i am trying to get my script to figure out the relevant last day of the school term. it needs to run until the current date is less than (as in before) the last day of the quarter. it just keeps on running no matter what. ps, i think the problem might be that it isnt resetting the "lastDayofQuarter" (at least outside of the loop). How can i circumvent this? thanks a ton!</p>

<pre><code>var today = new Date();

var lastDayofQuarter=new Date();

var lastDaysofQuarter=new Array();

lastDaysofQuarter[0]=(2009,11,3); 
lastDaysofQuarter[1]=(2010,11,10);
lastDaysofQuarter[2]=(2011,4,18);
lastDaysofQuarter[3]=(2011,5,10);

lastDayofQuarter.setFullYear(lastDaysofQuarter[0]);

i=0;

while (lastDayofQuarter&lt;today) {
 lastDayofQuarter.setFullYear(lastDaysofQuarter[i]);
 i++; 
}
</code></pre>
