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 triallidor nir
Courses Plus Student 1,101 PointsWhat is going on in that loop ?
Can someone explain this loop? is he declaring a char at the for statement? whats is going on ? how can you use ":" and what does it mean, did i skip a few videos or something?
1 Answer
lidor nir
Courses Plus Student 1,101 Pointsyeah he answered it later in another course and it's all clear now. Thank you very much for your help!
Noam Levy
4,480 PointsNoam Levy
4,480 Pointsthis is the "enhanced for loop" and it is used when you need to go through all the instances in a variable, when you can't tell how many times the loop should run or when you dont need an index for the times the loop ran. so as the video shows: