Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops Simplify Repetitive Tasks with Loops Create a while Loop

Gong T
Gong T
1,891 Points

Code is not working

Hello I keep getting this message when I "click check work"

"Important: In each task of this code challenge, the code you write should be added to the code from the previous task."

I thought I got the correct while loop, but not sure what is wrong. Please help. Thank you so much!

let count = 0;

while ( count < 26 ) {
  console.log(count);
  count ++;
}
script.js
let count = 0;

while ( count < 26 ) {
  console.log(count);
  count ++;
}

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

HI Gong T

The loop is indeed correct. When I copy your above code into the challenge, it passes.

If you're still having problems, try restarting the challenge and just copy/paste what is above into the challenge.

Nice work! :) :dizzy: