0

what is problem,

var x=0; for(; x<=10;){ if(x==6){ continue; } document.write(x +"<br>") x++; }

29th Feb 2020, 10:56 AM
Ãm Sabbir
Ãm Sabbir - avatar
3 Antworten
+ 2
it produce an infinite loop. when x==6. the loop continue but x is still 6 so x==6 is true again, and again and again
29th Feb 2020, 11:53 AM
Taste
Taste - avatar
+ 1
Put semicolon after document.write statement. 👇 document.write (x+"<br>");
29th Feb 2020, 10:59 AM
Scooby
Scooby - avatar
+ 1
var x=0; for(; x<=10;){ if(x==6){ continue; } document.write(x +"<br>"); x++; } this condition is not run. no result no error. just show blank page. what is problem
29th Feb 2020, 11:04 AM
Ãm Sabbir
Ãm Sabbir - avatar