Hi all, I’m having problems with the following task. Would love some help?

We are asked to return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.

```
function largestOfFour(arr) {
// You can do this!
var answer = [];
for (var i = 0; i < arr.length; i++) {
var biggestNumber = 0;
for (var sI = 0; sI < arr[i].length; sI++) {
if (arr[i][sI] > biggestNumber) {
biggestNumber = arr[i][sI];
}
}
answer[i] = biggestNumber;
}
return answer;
}
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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays/