Tell us what’s happening:
I got the tests passing. But the tests are off by one. The result they expect for fiboEvenSum(10); is what the correct result would be for fiboEvenSum(11);, based on the instructions.
The instructions list the first ten numbers as: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,
and those 10 numbers, excluding odd numbers, equals 44 (2 + 8 + 34). Number 11 is 144 and then you get 188 (44 + 144).
So I suggest one of the following changes:
- the instructions should specify that you start counting numbers from 2, (eg. the first ten are 2, 3, 5, 8, 13, 21, 34, 55, 89, 144)
- the tests are changed to reflect the current instructions (eg fiboEvenSum(11) = 188 or fiboEvenSum(10) = 44).
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
.
Link to the challenge:
https://learn.freecodecamp.org/coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers