title: Getting UNDEFINED at the end of a simple for loop function BEGINNER JAVASCRIPT
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const reverseArray = (words) =&gt; {
    for (let i = words.length - 1; i &gt;= 0; i--) {
      console.log(`${words[i]}`);
    }
  };
  
  const sentence = ['sense.', 'make', 'all', 'will', 'This'];
  
  console.log(reverseArray(sentence))
  
  // Should print ['This', 'will', 'all', 'make', 'sense.'];
  
  const nums = [1, 2, 3, 4, 5];
  
  console.log(reverseArray(nums));
  
  // Should print 5,4,3,2,1</code></pre>
  </div>
  </div>
  </p>
  <p>But it keeps giving me Undefined at the end ? I know this is a rookie question , sorry.</p>