Can anyone tell me whats the problem in this code??
**Your code so far**
function largestOfFour(arr) {
let resultArray = 0;
let answer = [];
for(let i=0; i < arr.length; i++){
for(let j=0; j < arr[i].length; j++){
if(resultArray < arr[i][j]){
resultArray = arr[i][j];
}
}
answer.push(resultArray);
}
return answer;
}
console.log(largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
.
Challenge: Return Largest Numbers in Arrays
Link to the challenge: