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 trialMichael Partridge
7,129 PointsShouldn't we run the for loop for ``` i <= mUsers.size() ``` instead?
If we have
i < mUsers.size()
wouldn't the last user not be included in our check?
1 Answer
Matthew Barrus
16,731 Pointsno, because we are starting our count from 0. so if there are 5 users, mUsers.size() will return 5, but the 5 values of i we will be looping are 0, 1, 2, 3, 4.