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 trialKeith James
Courses Plus Student 8,159 PointsI don't understand why the while loop didn't stop the loop at 5.
When the loop was tested for 6, the loop printed 6 times. I thought the while loop was set up to stop at 5. Why did it not stop? The video does not do a very good job of explaining this.
1 Answer
Keith James
Courses Plus Student 8,159 PointsThe only reason I can think of is if the internal function within the while loop just ran 6 times without looping back.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Keith,
Can you link to the video so we can review it? Or post the code you're referring to.