title: Adding only odd or even numbers.
body: <p>I want to make a function that when given an array of numbers and a condition, such as odd or even, the numbers which match that 
  condition are added together. If no values matches the condition, 0 should be returned. </p>
  
  <p>How can I do this without Array.prototype.filter() -- my textbook tells me to do it without this method.</p>
  
  <p>What if statements should I use?  </p>
  
  <pre><code>console.log(conditionalSum([1, 2, 3, 4, 5], "even"));        =&gt; 6
  console.log(conditionalSum([1, 2, 3, 4, 5], "odd"));         =&gt; 9
  console.log(conditionalSum([13, 88, 12, 44, 99], "even"));   =&gt; 144
  console.log(conditionalSum([], "odd"));                      =&gt; 0
  </code></pre>
  
  <p>Thank you. </p>