That's the infinite loop from the task 😄 The counter never changes, so the condition is always true. Reload the page (copy your code first if you can), then fix the loop so the counter advances.
Thanks for flagging. An endless loop keeps the browser busy, so a reload is the quickest way out — then check that something inside the loop changes the condition.
Comments 5
Join the discussion CommentAlready have an account? Log in
That's the infinite loop from the task 😄 The counter never changes, so the condition is always true. Reload the page (copy your code first if you can), then fix the loop so the counter advances.
Reloaded and fixed it. Phew.
Thanks for flagging. An endless loop keeps the browser busy, so a reload is the quickest way out — then check that something inside the loop changes the condition.
Stage 3 is the real lesson: always have a way out of a while loop, even if the expected event never happens.
"What if the signal never locks?" — the question every real loop needs to answer.