<풀이 코드>
const b = [[1, 0],[0, 3]];
function sol(a,b){
var result = [[,],[,]];
if(a[1].length == b[0].length){
result[0][0] = a[0][0]*b[0][0] + a[0][1]*b[1][0];
result[0][1] = a[0][0]*b[0][1] + a[0][1]*b[1][1];
result[1][0] = a[1][0]*b[0][0] + a[1][1]*b[1][0];
result[1][1] = a[1][0]*b[0][1] + a[1][1]*b[1][1];
return result;
}else{
return "-1";
}
}
console.log(sol(a,b));