Update count every second causing massive memory problems
- by Josh
Just on my local machine, trying the run the following script causes my computer to crash... What am I doing wrong?
(function($) {
var count = '6824756980';
while (count > 0) {
setInterval(function() {
$('#showcount').html(Math.floor(count-1));
count--;
}, 1000 );
}
})(jQuery);
All I need to do is subtract one from the var "count" and update/display it's value every second.