title: Get count of odd numbers in a given integer recursively
body: <p>Good day, I am trying to get the number of odd numbers in a given integer, say 15 should return 7, 3 should return 1, etc... Now i was able to do that simply in a for loop, but I want to achieve it recursively now. This is my code:</p>
  
  <pre><code>var count = 0;
  function oddCount(n){ 
      if(n !== 0 &amp;&amp; !isNaN()) {
          return count;
          if(n%2 === 0) {
              count ++;  
              return oddCount(n-1); 
          } else {
              return oddCount(n-1); 
          }
      }
  } // oddCount();
  
  console.log(oddCount(14));
  </code></pre>
  
  <p>The console always returns an undefined value.
  Thank you for any support in advance. :)</p>