Skip to content

Instantly share code, notes, and snippets.

@chriswebb09
Created May 11, 2017 08:33
Show Gist options
  • Save chriswebb09/dc2176186ed2c6b8f355345387674a61 to your computer and use it in GitHub Desktop.
Save chriswebb09/dc2176186ed2c6b8f355345387674a61 to your computer and use it in GitHub Desktop.
Traversing 2D Array
var twoDimensionalArray: [[Int]] = [[0, 1], [2, 3]]
for i in 0..<twoDimensionalArray.count {
for n in 0..<twoDimensionalArray[i].count {
print(twoDimensionalArray[i][n])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment