Solution to FreeCodeCamp's Return Largest Numbers in Arrays
function largestOfFour(arr) {
// You can do this!
var newArr = [];
for(var x = 0; x < arr.length; x+=1){
var max = 0;
for(var y = 0; y < arr[x].length; y+=1){
if (arr[x][y] > max) {
max = arr[x][y];
}
}
newArr.push(max);
}
return newArr;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);