Tell us what’s happening:
Hi! I’m stuck in this challenge. I don’t know what I 'm missing. Can anyone help me to understand?
Your code so far
function largestOfFour(arr) {
let maxArr = [];
for (let i = 0; i > arr.length; i++){
maxArr.push(Math.max(...arr[i]));
}
return maxArr;
}
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 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
.
Challenge: Return Largest Numbers in Arrays
Link to the challenge: