Sum All Odd Fibonacci Numbers

Tell us what’s happening:
Created an array of fiboNumbers. Now, i’m iterating through that list testing if divided by 2 they come up with a remainder so I can remove them. For some reason, it is removing odd numbers.

Your code so far

function sumFibs(num) {
  var fibs = [1,1];
  var x = 0;
  for ( i=0; i<num; i++ ){
    fibs.push(fibs[i] + fibs[i+1]);
  for ( a=0; a<fibs.length; a++ ){
    if ( fibs[a] % 2 == 0 ){
      fibs = fibs.splice(a,1);
  return fibs[0];


Your browser information:

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

Link to the challenge:

You are on the right track, just a small little error. If you read what Array.splice() does again carefully, it actually mutates or changes the array. And with a little more digging in the docs, Array.splice() actually returns the deleted elements! That should give you an idea on the fix.