I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
Thanks for the reply. I really can´t, though. Am I supposed to change arr.length to arr[i].length in the second for loop? Because that doesn´t seem to work either.
if you console.log the test you are failing console.log(largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]]))
it returns 25,48,21,0
but the largest number in that last array is -3 not 0. Why is it saying the largest number is 0?
Thanks for the reply. I get what you are saying: it isn´t working very well with negative numbers. But I don´t really know how to correct it. Is it normal to struggle like this with these exercises?
Thanks for all the help. I get what you are saying: I should either construct an “else” statement to cover this scenario, or use a different comparison operator. No idea which, though.