title: Trying to Use Recursion to solve Fibonacci (javascript)
body: <p><strong>This is the question</strong>:</p>
  
  <p>Given a positive integer num, return the sum of all odd Fibonacci numbers that are less than or equal to num.</p>
  
  <p>The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers. The first six numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8.</p>
  
  <p>For example, sumFibs(10) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1, 1, 3, and 5.</p>
  
  <p><strong>This is what I tried</strong></p>
  
  <pre><code>function sumFibs(num,  total = [1, 1], n = (total.length - 1 + total.length - 2)) {
  
  if(n == num){
  return total;
  }
  
  total.push(n);
  
  sumFibs(num, n = (total.length - 1 + total.length - 2), total);
  
  };
  
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>Is it possible to use my method to make this work, if so how do I fix the syntax? If not, how would you solve the problem. </p>
  
  <p>Many thanks!</p>