What should we do if we traverse the matrix like this?

how to program to traverse the matrix in this way.
for ease of understanding, I describe it this way, given a matrix

1 2 3 4
5 6 7 8
9 a b c
d e f g

I need to traverse the data in the lower left half of it, traversing diagonally first, followed by top-to-bottom traversal, such as 1, 6, b, g, 5, a, f, 9, e, d.



2

var cntRow = 4;
var cntCol = 4;
var m = [
    [1,2,3,4],
    [5,6,7,8],
    [9,'a','b','c'],
    ['d','e','f','g'],
];
var arr = [];
for(i=0; i<cntRow; iPP)
{
    for(k=0, j=0; k<cntRow - i; kPP)
    {
        arr.push(m[i+j][jPP]);
    }
}
console.log(arr);
Menu