Code isn't working as expected

Tell us what’s happening:

  **Your code so far**

function largestOfFour(arr) {
let max = 0;
let arrFinal = [];
for(let i=0;i<arr.length;i++){
  max = Math.max(...arr[i]);
  arrFinal.push[max];
  max = 0;
}
return arrFinal;
}

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Return Largest Numbers in Arrays

Link to the challenge:

got it. Thank you @camperextraordinaire

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.