All tests pass except one. Did you guys experienced the same problem?When num is 75025 i get 60696 but the tests expect 135721.
Here is my code:
function sumFibs(n){
let a =0,b=1,c=1;
let res = [];
while(c<n){
c = a+b;
a=b;
b=c;
res.push(a);
}
return res.filter(elem=>{
return elem%2!==0;
}).reduce((acc,elem)=>{
return acc+elem;
},0);
}
console.log(sumFibs(75025));