Arrays & Array Methods (map, filter, reduce)
What transformation is being performed on the matrix?
const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
const rotated = matrix[0].map((_, colIndex) =>
matrix.map(row => row[colIndex]).reverse()
);