Problem 2: Even Fibonacci Numbers I didn't understand this challenge

Tell us what’s happening:

So what I do exactly? Summing all even numbers below the provided number or what? Because that doesn’t seem the case since even numbers below 10 is definitely not 188

function fiboEvenSum(number) {
// You can do it!
return true;
}

fiboEvenSum(10);

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Can anyone tell me what I do this challenge? I really don’t understand it.

The Fibonacci numbers not only numbers. I did not so far , but I think You must doing a sum Fibonacci seqeunce from even numbers.
in the example are 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 , number 34 are odd and the 1 special 229-35 =188

I really didn’t understand what do you mean. Do you mean that I have to sum all even numbers?

But that still doesn’t explain how the provided number can do anything here.

First create Fibb numbers 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 as array [] wit for loop
second loop array and x%2===0 test even number to add to the sum
return sum of even numbers

What the heck!! You spoiled the whole solution. I didn’t want this.

it’s not so easy there many small step

I didn’t want you to tell me the solution. I just wanted to know what I have to do this challenge. I didn’t understand what is the point of this challenge.

Just try it’s not easy as it’s looks like now.

Dude.

I. Want. To. Know. What. Is. The. Point. Of. This. Challenge

I. Don’t. Understand. The. Goal. Of. This. Challenge.

sorry I have one mistake eight is also odd

You still didn’t answer my question though.

Dude…chill down.

Ludodrinka is trying to help.
What is the purpose of this challenge? Maybe follow instructions? Read & understand instructions?
“Even numbers below 10 is definitely not 188”, well, that is not the request: “first 10 terms”. Maybe that will help?
Sometimes solutions are much easier than expected.

But this challenge cannot be completed with instructions of 4 mil. I am not convince it should be even I send you code.

Lubodrinka,
THe 4 million restrictions is for a value on the fibonacci value, because you would have an overflow…but your code is correct !

@lubodrinka I’m sorry for the rudeness before. I apologise and thank you for trying to help me!

@eday69 Thank you for the help! It was useful.

2 Likes

I still not pass numbers 18 and 31

Your function is not returning the correct result using our tests values.

here is ouput from chrome
10
VM75:23 1,1,2,3,5,8,13,21,34,55,89
VM75:7 23
VM75:23 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368
VM75:7 43
VM75:23 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733
VM75:7 18
VM75:23 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181
VM75:7 31
VM75:23 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309

@lubodrinka Yes it is, but are you adding the EVEN values?
For 10: 2+8+34+144 = 188

I think the issue is that you are considering # 1 twice…(I know, it is part of the fibonacci sequence).

Assuming you know what Fibonacci sequence is by now, fiboEvenSum(n) computes nth sequence of fib, then sums all the even number within that sequence.

For example, fib(6) => [1, 1, 2, 3, 5, 8] i.e) returns the sequence of first 6 Fibonacci numbers.
Since 2 and 8 are the only even number, fiboEvenSum(6) returns the sum 10.

I don’t think the instructions are clear at all and possibly wrong. If someone sees an error in my thinking please chime in.

fiboEvenSum(10) should return 188.

What is significance of the parameter?
In the case of 10 are we only to consider the first 10 Fibonacci numbers? The first 10 even Fibonacci numbers?

Assuming that this means the first ten in the series there are still some issues

By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89

Most accepted series start with 0 and include two 1’s - 0,1,1,2,3,5,8…

Even using the provided definition of Fibonacci numbers that starts with one there are issues. Taking that definition of the first 10 in the series I only see three even numbers - 2, 8, 34 summing to 44. It is not until the 11th number in the series, 144, that the sum of evens would be 188.