Find the largest number in each of the sub-array and then make an array of those largest numbers.[[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1
I have been through the code and ended with other solution. The first for loop iterates through the big array and the second one through the components of the subarray.
function largestOfFour(arr) {
var main = [];
for(k=0;k