I am working with a two-dimensional array, matrix[2][2]
, that I have stored in a list:
var list= ["a","b","c","d"];
In addition to the list, I also have two specific coordinates:
var x = 0;
var y = 1;
My goal is to retrieve the element at position (x,y)
from the list, for example: (x,y)==(0,1)
which corresponds to the letter c
.
Can anyone advise me on how to achieve this?
The fictitious matrix depicts the following structure:
a b
c d