Skip to content

Commit

Permalink
error counting
Browse files Browse the repository at this point in the history
while using for to loop `0..<array.count`, it will loop array.count times.
  • Loading branch information
joeybuddy authored Dec 7, 2017
1 parent ee16049 commit cc5ee6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for index in 1...5 {

var array = [1,2,3]

for index in 0..<array.count{
for index in 1..<array.count{
//It will iterate (array.count - 1) times.
}

Expand Down

0 comments on commit cc5ee6e

Please sign in to comment.