This is my code for returning the largest numbers in the arrays. The problem is that I have set the initial value to zero.
So the negative numbers are not considered and instead the value shown is 0. Hence instead of the greatest negative number it shows 0. Atleast that’s what I think.
How do I salvage the situation?

**Your code so far**

function largestOfFour(arr) {
let largest=[0,0,0,0];
//here i is array index of the array and j is the sub-array index.
for (let i =0;i<arr.length;i++) {
for (let j =0;j<arr[i].length;j++)
if(arr[i][j] > largest[i]){
largest[i] = arr[i][j];
}
}
return largest;
}
largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]]);

**Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.

well, what else you could use as starting value? there are two distinct possibilities that you could use, both would work. You just need to find one of them, and it will work

Try to figure out what you can use as starting value instead of 0 - as 0 is always bigger than negative values, you can’t use it if the array contains only negative values, so you need to figure out an alternative