Tell us what’s happening:
This solution seems to be working somehow, but it doesn’t pass 3 of 4 tests, any help?
**Your code so far**
let maxArray = [];
function largestOfFour(arr) {
for (let i = 0; i < arr.length; i++) {
maxArray.push(Math.max(...arr[i]));
}
return maxArray;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);
Link to the challenge: