Return Largest numbers in arrays..!

Tell us what’s happening:

any correction needed???
It’s not passing the last test case…

Your code so far


function largestOfFour(arr) {
  // You can do this!
  var myArray=[];
  for(var i=0; i<arr.length; i++){
    var biggestNo=0;
    for(var j=0; j<arr[i].length; j++){
      if(arr[i][j] > biggestNo){
        biggestNo = arr[i][j];
      }
    }
    myArray[i]=biggestNo;
  }
  return myArray;
}

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/67.0.3396.99 Safari/537.36.

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

biggestNo = 0

The last array is populated by negative numbers only: if you compare them with 0 as you did here

if(arr[i][j] > biggestNo)

your function will return 0 even if there is no 0 in the array passed in ^^