Return Largest Numbers in Arrays( Try different )

function largestOfFour(arr) {
var arr1=arr.map(ele=>Math.max(…ele));
return arr1;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Do you have a question?

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.

We have set your post to unlisted. Thanks for your understanding.