let array: number[][] = [
[3, 1, 4, 0],
[5, 1, 9, 8],
[7, 6, 2, 5]
];
// Function to sort each row
const sortedArray: number[][] = array.map(row => row.slice().sort((a, b) => a - b));
console.log(sortedArray);
/*
Run:
[[0, 1, 3, 4], [1, 5, 8, 9], [2, 5, 6, 7]]
*/