<script>
var num=10;
while(num<=20000000){
document.write(num+'<br/>');
num++;
}
</script>
As you can see above num starts at 10 and goes till 20 million. But, this program does not work on my computer. My computer just freezes after running this code for few seconds. Does 20 million is very big value which javascript can't handle or their is issue with browser memory about which I am unaware. If I run same logic in c , it does work. What's the problem here?
My computer configuration :
Main Memory : 2GB
processor : Intel Quad core processor ( up to 2.66 GHz)