title: Sums of odd numbers in array
body: <p>I am trying to get the sum of the odd numbers in an array. I am trying to write a method <code>odd_sums</code> that accepts an array of numbers, and return the sum of the odd numbers in it.</p>
  
  <pre><code>odd_sum([5,4,6,13,1]) # =&gt; 19
  odd_sum([10,2,11,3]) # =&gt; 14
  odd_sum([8,18]) # =&gt; 0 
  </code></pre>
  
  <p>I got the odd numbers in the array:</p>
  
  <pre><code>def odd_sum(a.)
    new_arr = []
    i = 0
    while i &lt; a.length
      if a.[i] % 2!=0
        new_arr &lt;&lt; a.[i]
      end
      i += 1
    end
    return new_arr
  end
  </code></pre>
  
  <p>But I cannot get the sum of the odd numbers. Please help me.</p>