title: Returning an Array of Largest Number in sub-arrays of an Array
body: <p>I am trying to get the largest number of each sub-array in the array
  I sorted them but I can't seem to get my result.
  The result should be an array of the largest number of each sub-array.</p>
  <pre><code>function largestOfFour(arr) {
    for(var i = 0; i &lt; arr.length; i+=1){
      for(var n = 0; n &lt; arr[i].length; n+=1 ){
        arr[n].sort(function(a, b){return b-a});
      }
        console.log(arr[i][0]);
    }
    return arr[i][0];
  }
  
  largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
  </code></pre>