function largestOfFour(arr) {
var newArray = [];
for(var i =0; i <=arr.length-1; i++){
console.log(arr[i]);
newArray[i] = Math.max(arr[i]);
If you want the ultimate max do this.
var original = [[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]];
Math.max.apply(null, original.map(function(arr) { return Math.max.apply(null, arr); }));
or if you want a the max of each array just do
original.map(function(arr) { return Math.max.apply(null, arr); });