I think john what he's refering is just what he says. Take this two
code samples:
Listing 1:
var d = new Date();
var d = new Date();
for(var i = 0; i<40; i++){
if(i==29)
console.log(d);
else if(i==30)
d.setFullYear(2010);
else
console.log(i)
}
Listing 2:
var d = new Date();
for(var i = 0; i<40; i++){
if(i==30)
console.log(d);
else if(i==31)
d.setFullYear(2010);
else
console.log(i)
}
In the Listing1, the output of console.log(d) is:
Tue Feb 17 2009 09:37:28 GMT-0200 (ARST)
But in the Listing2 the output is:
Wed Feb 17 2010 09:35:05 GMT-0200 (ARST)
And you can see that the only difference between the two listings is
the step of the loop in which I change the year and do the log. I can
see that when i reach 29 the console stops for a split of second and
then continues till the end of the execution in bigger loops (500
loops is big enough).
Hernán