JavaScript 알고리즘을 푸는 과정에서 발생한 에러
function solution(arr1, arr2, signs) {
let answer = [[]];
for (let i=0; i<arr1.length; i++){
console.log(answer[i]) // []
for(let j=0; j<arr1[i].length; j++){
if (signs[i][j] === false) {
arr1[i][j] = (arr1[i][j]) * -1
arr2[i][j] = (arr2[i][j]) * -1
}
console.log(arr1[i][j] + arr2[i][j]) // 10,8,-7,-9,8,-11
answer[i].push(arr1[i][j] + arr2[i][j])
}
}
return answer;
}
answer[i].push(arr1[i][j] + arr2[i][j])
answer[i] =[];