This a code a made to move rows in a (3\*3) matrix.

```
const transY =(arr)=> {
    const arrtY = []; 
    for (let i = 1; i < 4; i++) {
        for (let j = 0; j < 3; j++) {
            if (i==3) {
                return arrtY.unshift(arr[3*0+j]);
            }
            return arrtY.push(arr[3*i+j]);
        }
    }
    return arrtY;
}

```

Expected output (in an array) :

```

1  2  3       7  8  9       4  5  6
4  5  6  ==>  1  2  3  ==>  7  8  9 ==>  [...]
7  8  9       4  5  6       1  2  3

```

When I log arrtY in the console I only see 1.