Something i learned online is multidimensional arrays. When I came across to multidimensional arrays* I thought arrays go into a different worlds, do they have many ways of being written in a different way? * Nope, lol. Its just a way to deal with an annyoing array, but it’s good to learn how to deal with it now than later and when you’re trying to research it in a hurry :-]
Let’s say we have an array string = [“Amanda”, “Riley”, “James”, “Billy”]
then we puts string_array[1] it will come out to “Riley”
Now let’s do multidimensional arrays. It would probably look like this: string_array = [ [“Amanda, “Riley”], [“James”, “Billy”]] -> omg this looks really complicated!!! well at least to me, it’s my first time seeing this. So this is how we see it, Amanda and Riley is one array, which is 0 because arrays start from the number 0, and James and Bily is another array which is 1
0 , 1 ["Amanda, Riely] , ["James", "Billy"] arrays within on array.
Lets say we puts string_array[1] [1] [4]
We are calling the 1st array which is “James” and “Billy Then we are calling 1st name which is Billy Last we are calling the 4th letter within Billy, which is “y”
And that’s multidimensional arrays, I hope i explained this right and hope this helps! :-]