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

Tevi Lawson
Tevi Lawson
5,645 Points

It keeps saying my took too long to run

is this a system error or did I miss something?

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

1 Answer

Kyle Knapp
Kyle Knapp
21,523 Points

You aren't incrementing count, so count will remain at 0, and since 0 is always less than 25, your program becomes stuck in an infinite while loop, which is why it keeps saying your program took too long to run.