JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Create a while Loop

Tevi Lawson
Tevi Lawson
5,645 Points

How do I fix this code - please help

I'm not sure what to change here

var count =1;
while (count <= 25){

2 Answers

var count = 0;

while(count != 26) {
     count ++;

You forgot to increment (add on) a 1 to the count each time. Otherwise the condition would run unlimited times and wont stop because the count remains at 0.