title: Multi-dimensional arrays and how to find largest number
body: <p>I am trying to find and return the largest number in each array using a for loop but every time I try to print something I get an error. I have tried using the following JS array methods: Math.max, Math.max.apply but I cannot get them to work.</p>
  
  <p>My code is below. Any help will be appreciated and if you could please point out what I am doing wrong, that would be really great. Thanks in advance!</p>
  
  <p>Question: numbers is an array of integers.  Find and return the largest integer.</p>
  
  <p>My code:</p>
  
  <pre><code>function largestNumber(numbers) { // this function was given by the quiz writer, my code starts below "code here"
    // code here
  
    numbers = [1, 2, 3, 4, 5];
    for(let i = 0; i &lt; numbers.length; i++){
      let largest = 0;
      if(numbers[i] &gt; largest){
        largest = largest.numbers[i];
      }
    }
    return largest;
  }
  
  console.log(largestNumber);
  </code></pre>