in JS, when i create 2-d array, it seems that the coordinate is reversed. like array[y][x], instead of array[x][y]
var grades = [[89, 77, 78],
[76, 82, 81],
[91, 94, 89]];
print(grades[2][1]); //94
how to reverse this coordinate?
var grades = [[89, 77, 78],
[76, 82, 81],
[91, 94, 89]];
function reverseCoordinate(grades){
......
}
print(grades[2][1]); //81