I've got a multidimensional array:
foo = [["a","b","c"], ["d", "e", "f"], ["g", "h", "i"]]
Now I need to ruturn the "coordinates" of "f", which should be (1,2). How can I do this without knowing which "row" "f" is in? I've been trying to use the index method, but this only works when I tell it where to look, i.e.
foo[1].index("f") #=>2
I tried something like
foo[0..2][0..2].index("f")
but that just returns nil.
Is this possible?