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 trialJaymond Lockley
3,553 PointsWhat does [i] stand for?
Im not sure what it means .
1 Answer
Daniel Riches
19,847 PointsI believe i stands for iteration. But within the bracket it corresponds to the array's index. So you're relating the loop iteration with the array index. For instance when i = 2, then the array index is also 2, i.e. array[2]
Justyna Szofinska
6,178 PointsJustyna Szofinska
6,178 PointsThis square bracket represent an array - multiple variable. When you create a loop with "i" variable you can put every number of the loop into "i". For example:
arr[i] means that during the loop we create arr[0],arr[1],arr[2] and so on until the loop will end.