**Tell us what’s happening:**

I’m doing this challenge again because I want to figure out how to use nested loops to figure this out. My logic is flawed, but I’m not sure how to navigate around it. I’m not looking on any other websites for clues or hints and trying to figure this out for myself.

That said, a gesture, a nudge would be appreciated.

**Your code so far**

```
function largestOfFour(arr) {
//initialize variables
var array = [];
var i;
var s;
//iterate through arrays
for(i=0;arr.length>i;i++){
for(s=0;s[i].length<4;s++){
//set length of subarray to be greater than subarrays in order to capture largest of subarrays
if(s[i].length>s){
//assign this to array
array = s[i].length;
}
}
}
return array;
}
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/69.0.3497.100 Safari/537.36`

.

**Link to the challenge:**

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