I’m guessing that you want to loop through the size of each sub-array. The condition needs to be modified. The same idea you used with arr.length in the first loop is the key.
For the array of largestOfFour, the next sub-array is larger than prev-array.
for(i=0; i<arr.length; i++){
highest = arr[i][0];
for(j=0; j<arr[i][j]; j++){
if(arr[i][j]>=highest){
highest = arr[i][j];
finalArr[i] = highest;
}
}
}