Is this an infinite loop!


My computer is freezing up and buffering when I try to run this, is it an infinite loop, I tried it on another laptop same thing?

var monster= true;
{ console.log("I love dragons");

for (var a=0; a< 20; a++);


Hi, @sarahharrison ,

You have a semicolon at the end of the line here ...


... and here ...

for (var a=0; a< 20; a++);

Those semicolons terminate the statements, and cut off the loop headers from the intended content of the loops.


Thank you so much! @appylpye


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.