Sum All Odd Fibonacci Numbers helpp

function sumFibs(num) {
  
  var fibonacci = [1, 1];
  for (var i = 1; i < num; i++) {
      var answer = fibonacci[i] + fibonacci[i - 1];
      fibonacci.push(answer);

    }
  
  return fibonacci;
}

sumFibs(5);

Above is my code I am using to understand the problem. It is an incomplete solution. The problem I am having is that the code is crashing FCC challenge. I ran the code on Codepen.io with no issues. What am I missing?

Hey Randell,

Thank you for the reply.

I managed to solve the problem by clearing the ‘auto execution’ of my code when loading the page. This is no longer an issue as I have since solved the problem.

Thanks again and sorry for the delay in getting back to you