Solución
solution.tsTypeScript
function addMatrices(matA: number[][], matB: number[][]): number[][] {
// Tu código aquí
let matResult = []
for (let i = 0; i < matA.length; i++){
var fila = []
for (let j = 0; j < matB[i].length; j++){
fila = [...fila, (matA[i][j]+matB[i][j])]
}
matResult.push(fila)
}
return matResult;
}
// No modificar: necesario para evaluar el resultado.
export { addMatrices };0respuestas