My solution works but FreeCodeCamp did not accept my answer. I tested it on all parameters required. It produces the result in the array format that it is requesting. Please help
var largestArr = [];
function largestOfFour(arr) {
// You can do this!
for (var i = 0; i < 4; i++) {
arr[i] = arr[i];
// console.log(arr[0]);
// console.log(arr[1]);
// console.log(arr[2]);
// console.log(arr[3])
// console.log(arr[i][0]);;
arr[i].sort(function(a,b){
return a < b;
});
console.log(arr[i][0]);
answer = arr[i][0];
largestArr.push(answer);
console.log(largestArr);
}
console.log(largestArr);
return largestArr;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);