I'm trying to check through a loop each element of this 2D array:
matrix = [[0, 1, 1, 2],
[0, 5, 0, 0],
[2, 0, 3, 3]]
But, when I do: return matrix.length
I get a 3
. How is it possible for me to loop through it to check each value?
Also, take in consideration I may get an array like this too:
[[2],
[5],
[10]]