# Basic Algorithm Scripting - Return Largest Numbers in Arrays

**Tell us what’s happening: i dont understand why my code work only in 4 steps vérification **
Describe your issue in detail here.

**function largestOfFour(arr) {

var maxValue = [0,0,0,0];

for (var i = 0; i < arr.length; i++) {
for(var j = 0; j<arr[i].length; j++) {
if (arr[i][j]> maxValue[i]){

``````        maxValue[i] = arr[i][j];
}
}
``````

}

return maxValue;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);**

``````function largestOfFour(arr) {

var maxValue = [0,0,0,0];

for (var i = 0; i < arr.length; i++) {
for(var j = 0; j<arr[i].length; j++) {
if (arr[i][j]> maxValue[i]){

maxValue[i] = arr[i][j];
}
}
}

return maxValue;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.52`
In the final test, you have this array: `[-72, -3, -17, -10]`
In your code, you start with a lowest number of `0` and check for numbers that are larger than that, but all of those numbers are smaller; so your code will return `0` as the largest number, when it should really return `-3`.