Merge pull request #362 from dawirstejeck/off_by_one

Fix off-by-one mistake in while loop explanation
This commit is contained in:
Carol (Nichols || Goulding) 2016-12-18 11:18:33 -05:00 committed by GitHub
commit 7d2a7b45a9

View File

@ -383,7 +383,7 @@ the value is: 50
```
All five array values appear in the terminal, as expected. Even though `index`
will reach a value of `6` at some point, the loop stops executing before trying
will reach a value of `5` at some point, the loop stops executing before trying
to fetch a sixth value from the array.
But this approach is error prone; we could cause the program to panic if the