```
function sumFibs(num) {
var m=0;
var n=1;
var fibb;
var sum = [0,1];
var totalsum=0;
for(var i=1;i<=num;i++){
fibb = m+n;
m = n;
n = fibb;
sum.push(fibb);
}
for (var j = 0;j < sum.length; j++){
if(sum[j] < num && sum[j]%2 != 0){
totalsum = totalsum + sum[j];
}
}
return totalsum;
}
sumFibs(75025);
```

It is your **if statement.** You have **sum[j] < num** and it should be **sum[j] <= num**.

The instructions say:

Given a positive integer num, return the sum of all odd Fibonacci numbers that are

less than or equal to num.

1 Like