๋ฌธ์ ๐ฝ
https://school.programmers.co.kr/learn/courses/30/lessons/12950
๋ค๋ฅธ์ฌ๋ ํ์ด ๐ฝ
function sumMatrix(A,B){
return A.map((arr1, idx1) => arr1.map((val, idx2) => val+B[idx1][idx2]));
}
๋ดํ์ด๐ฝ
1. ์ฑ๊ณต โญ
function solution(arr1, arr2) {
let answer = [];
arr1.forEach((array,index)=>{
let pushArray = []
array.forEach((ele,index2)=>{
pushArray.push(ele+arr2[index][index2])
})
answer.push(pushArray)
})
return answer;
}
๋๋์ ๐ฝ
์ฝ๊ฒ ํ์ ์์๋ค...๐