Having a real hard time figuring out why this is failing every test in this challenge. I also get the “TypeError: Cannot read property ‘length’ of undefined” every time.

**Your code so far**

```
function largestOfFour(arr) {
let newArr = [];
for (let i = 0; i < arr.length; i++) {
let largest = arr[i][0];
for (let j = 0; j < arr[i].length; i++) {
if (arr[i][j] > largest) {
largest = arr[i][j];
newArr.push(largest);
}
}
}
return newArr;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [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/87.0.4280.141 Safari/537.36`

.

**Challenge:** Return Largest Numbers in Arrays

**Link to the challenge:**