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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![SHAWNELL HARRISON](https://secure.gravatar.com/avatar/f0d336183749928b3d23d3763bf0af0a?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
SHAWNELL HARRISON
16,282 PointsHelp Please
I can't figure this one out.Can someone help me? I dont know what goes into the blank.
var counter = 0; while ( counter < blank ) { console.log(counter); counter += 1; }
2 Answers
![Heidi Fryzell](https://uploads.teamtreehouse.com/production/profile-photos/10752501/micro_new-headshot.jpg)
Heidi Fryzell
Front End Web Development Treehouse Moderator 25,178 PointsThe Loop is supposed to run 10 times, so you would put "10" in where it says blank.
Counter starts at zero and and increments +1 every time it goes through the loop.
It keeps running as long as it is less than 10.
Remember the first time the loop runs counter is 0.
So starting at 0 it runs 10 times.
0,1,2,3,4,5,6,7,8,9
Then when it gets to 10 it stops the loop because 10 is > counter.
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsIf it has the requirement: Finish the code below so that the loop runs 10 times
then the blank should be 10. Since the while statement is < blank (not <=), and counter is initialized to 0, the loop will run with counter values 0-9 which would be 10 times.
SHAWNELL HARRISON
16,282 PointsSHAWNELL HARRISON
16,282 PointsThanks,I appreciate u