hey guys,
I have reached the return largest number checkpoint, I think i have got the code almost correct as it passes first and third test but it doesn’t seem to pass the second test. Please help me find my mistake.
function largestOfFour(arr) {
// You can do this!
var largest=0, nArr=[] ;
for(i=0;i<arr.length;i++)
{
for(j=0;j<arr[i].length;j++)
{
if(largest<arr[i][j])
{
largest=arr[i][j];
}
}
nArr.push(largest);
}
return nArr;
}
largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
thanks guys.
