# Problem 2: Even Fibonacci Numbers "Your function is not returning the correct result using our tests values."

Problem 2: Even Fibonacci Numbers "Your function is not returning the correct result using our tests values."
0

#1

I couldn’t complet this problem, I succeded on every test except for the: “Your function is not returning the correct result using our tests values.” with the code below:

``````
function fiboEvenSum(number) {
// You can do it!
let first = 1, second = 2, next = 0;
let aux = 2;
for(let i = 1; i <= number; i++) {
next = first + second;
first = second;
second = next;
if(next % 2 == 0) aux += next;
}
return aux;
}
fiboEvenSum(10);
``````

But then I just changed the i variable initial value from 1 to 2, and it worked just fine. Does anyone have any idea why this happened? How does that test case work?
Thanks!

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36`.

#2

well the test instructions say:

the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …

#3