Tell us what’s happening:
my function returns the correct result for each test, still I see this message without any further hints:
Your function is not returning the correct result using our tests values.
Your code so far
function fiboEvenSum(n) {
var x = [1,1];
var l = 2;
var m= 2;
while (l<=n)
{
x.push(m);
l = x.length;
m= x[l-1]+x[l-2];
}
x = x.filter(function(element, index, array){
return (element % 2 !== 0);
});
var s = x.reduce((a, b) => a + b, 0)
return s;
}
fiboEvenSum(10);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 OPR/62.0.3331.116
.
Link to the challenge: