Return Largest Numbers in Arrays, help

First of all, it’s bad practice to mutate the array that’s supplied to you. You are better off making a copy and making all the operations with the copy. You can do that by using a spread operator or slice array method.

Anyway, back to your problem. Avoid using FCC challenge pages for debugging. Use something like repl.it or google chrome console instead, because they are much better suited for debugging. If you were to use a proper debugger you’d see that console.log() in your situation prints:

console.log(arr) // [ [ 5 ], [ 27 ], [ 39 ], [ 1001 ] ]

As you can see this is still an array of arrays ( each one has one element in it), and what you want is an array of numbers, that is why your tests are failing. In order to transform elements of an array into something else you can use a really handy array method called map. Think about how you can use map to solve your problem, read the MDN docs on map. Ask if you have more questions, good luck!