Problem 2: Even Fibonacci Numbers 44 or 188?

Tell us what’s happening:
My initial solution created an array which I then called .reduce() on to sum the even valued terms. But that would not pass. I then used the code shown here to pass the challenge. However shouldn’t the first returned value be 44 and not 188; as 144 is the 11th term and shouldn’t be summed, or?

I am a math noob but am really confused by this.

Your code so far


function fiboEvenSum(n) {
  let a = 1
  let b = 1
  let c 
  let num = 0
  while ( n >= 0) {
    c = a
    a = a + b
    b = c
    n--
    if (c % 2 == 0) {
      num += c;

    }
      console.log(num)
  } 
  return num;
}

fiboEvenSum(10);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

Yes, I am not sure either. The problem seems mis-specified since it already tells you the first 10 numbers in the sequence. So, if we are using those, the result definitely shouldn’t be 188.