title: How to print Odd and Even numbers in Javascript
body: <p>I'm trying to merge this two codes to run as a working function that print out odd and even numbers.
  but I don't know on how to use a <code>var</code></p>
  <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>let num = [1,2,3,4,5,6,7,8,9,];
  
  console.log('even numbers are');
  for (var i = 1 ; i &lt; 10 ; i += 2 ) {
     console.log(i);
  }
  
  
  console.log('odd numbers are ');
  for (var i = 2 ; i &lt; 10 ; i += 2 ) {
    console.log(i);
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Help. Thanks</p>