Seems like it should work!?!?

Tell us what’s happening:
This passes all the tests provided yet doesn’t clear the challenge. Am I doing something wrong? I have very limited knowledge of the .splice() method, discovered it while looking for an answer to this. Maybe that’s what’s wrong, but again, the code passes all the tests.

Your code so far

function largestOfFour(arr) {
  for(var i = 0; i < arr.length; i++) {
    arr[i].sort(function(a, b){return b-a;});
    arr[i].splice(-3, 3);
    
  }
  return arr;
}

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

Your browser information:

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

Link to the challenge:

Wow, what a silly oversight. Is there a way to keep this code and just remove the sub-arrays? I can’t seem to find one. Back to the drawing board, thank you very much!.

This returns the right answers, as far as I can tell, but still doesn’t complete the challenge.

var array = [];
function largestOfFour(arr) {
  for(var i = 0; i < arr.length; i++) {
    arr[i].sort(function(a, b){return b-a;});
    arr[i].splice(-3, 3);
    array.push(arr[i][0]);
    
  }
  
  return array;
}

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

I guess I don’t need the .splice() anymore, still searching, still confused, lol. Thanks for all the help though!