title: How to return first odd number - JavaScript
body: <p>I can't figure out how to make my code return the first odd number and if there are no odd numbers to return undefined. What am I doing wrong/need to research? The 3 requirements I have are;</p>
  <p>1 Return the first odd number in an array of odd numbers</p>
  <p>2 Return the first odd number when it is the last number in the array</p>
  <p>3 Return undefined when there are no odd numbers</p>
  <pre><code>function firstOdd(arg){
    for (let i=0; i &lt;= arg.length; i++) 
    if (i % 2 !== 0) {
      return(i)
    } else {
      return undefined;
    }
  }
  </code></pre>
  <p>Thank you in advanced for being kind with me.</p>