+ 2

In java script loops. var i =0; for(; <10000000). { document.write(i+ "<br />"). i++ ; }

that code are didn't worked in output why?this " (<1000)" this number also worked.. but that big number didn't work in my output why.....😞😞😞?

18th Apr 2017, 12:08 PM
Vigneshwar
1 Answer
+ 1
try for(var i = 0; i < 10000000; i++){ console.log( i ); } document.write is deleting everything on the page each time it loops. instead of displaying in the console you could try to select the body tag and use body.innerHtml += i
19th Apr 2017, 8:49 AM
mete
mete - avatar