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)
![Jason Nutt](https://uploads.teamtreehouse.com/production/profile-photos/11531927/micro_youtube-new-bg.webp)
Jason Nutt
Front End Web Development Techdegree Graduate 24,760 PointsI was thinking that 0 would be included into the factoring of this for loop? Making the answer 9.
for ( let i = 0; i < 9; i ++ ) { console.log(i); }
3 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 PointsHi Jason,
This was a tricky one.
The answer would be 9 if the condition were: i <=9
But since you could not change the comparison operator to include the equals sign you had to use i < 10 in order for the loop to run 10 full times.
Remember that the loop starts counting at zero.
0 - 1st time 1 - 2nd time 2 - 3rd time 3 - 4th time 4 - 5th time 5 - 6th time 6 - 7th time 7 - 8th time 8 - 9th time 9 - 10th time.
If the condition is set to i < 9, it will evaluate to false when i = 9 and it won't run a tenth time.
I hope that makes sense. Happy Coding!
Heidi
![Jason Nutt](https://uploads.teamtreehouse.com/production/profile-photos/11531927/micro_youtube-new-bg.webp)
Jason Nutt
Front End Web Development Techdegree Graduate 24,760 PointsThanks Heidi. It makes sense!