Sum All Odd Fibonacci Numbers Typo

Sum All Odd Fibonacci Numbers Typo
0
#1

I believe there is a typo in the challenge description. That, or I don’t understand what is being asked. It states: " ‘sumFibs(10)` should return “10” because all odd Fibonacci numbers less than or equal to “10” are 1, 1, 3, and 5.’ This is actually the sequence for 5. Instead, if I understand the problem. the odd sequence should be 1,1,3,5,7 and 9. All of these are less than 10, and add up to 26. Right?

Your code so far


function sumFibs(num) {
  return num;
}

sumFibs(4);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0.

#2

You are misunderstanding what the Fibonacci sequence is. The following is the sequence of the numbers up through 10.

1, 1, 2, 3, 5, 8

So the odd ones are:

1, 1, 3, 5 // sum of these is 10

What you listed before (1,1,3,5,7 and 9) is just a list of odd numbers.