Christopher Grey

21%
Flag icon
The following example shows how we can define a two-dimensional array and retrieve an individual value within the two dimensions: let multiArray = [[1,2],[3,4],[5,6]] let arr = multiArray[0]         //arr contains the array [1,2]   let value = multiArray[0][1]    //value contains 2
Mastering Swift 5
Rate this book
Clear rating
Open Preview